]> kaliko git repositories - python-musicpd.git/blobdiff - mpd.py
mpd.py: support commands with underscores
[python-musicpd.git] / mpd.py
diff --git a/mpd.py b/mpd.py
index 9494b0e41d2fe1eea5e25f3e3c2037f23262200c..5973a39b34c5580b3a885e67a232c76b5649d8fd 100644 (file)
--- a/mpd.py
+++ b/mpd.py
@@ -67,6 +67,8 @@ class MPDClient(object):
             # Playback Option Commands
             "consume":          self._fetch_nothing,
             "crossfade":        self._fetch_nothing,
+            "mixrampdb":        self._fetch_nothing,
+            "mixrampdelay":     self._fetch_nothing,
             "random":           self._fetch_nothing,
             "repeat":           self._fetch_nothing,
             "setvol":           self._fetch_nothing,
@@ -155,10 +157,11 @@ class MPDClient(object):
         else:
             command = attr
             wrapper = self._execute
-        command = command.replace("_", " ")
         if command not in self._commands:
-            raise AttributeError("'%s' object has no attribute '%s'" %
-                                 (self.__class__.__name__, attr))
+            command = command.replace("_", " ")
+            if command not in self._commands:
+                raise AttributeError("'%s' object has no attribute '%s'" %
+                                     (self.__class__.__name__, attr))
         return lambda *args: wrapper(command, args)
 
     def _send(self, command, args):