X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=mpd.py;h=5973a39b34c5580b3a885e67a232c76b5649d8fd;hp=d40b5fab8791291db4e48b174fc97b29989533a8;hb=756f8629e87886799fbbb7467ce022613cf56ac9;hpb=a299df609a97947e767e721e0623442b64705ac9 diff --git a/mpd.py b/mpd.py index d40b5fa..5973a39 100644 --- a/mpd.py +++ b/mpd.py @@ -157,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):