From: Kaliko Jack Date: Thu, 9 May 2013 12:26:54 +0000 (+0200) Subject: Ease unitesting with mock X-Git-Tag: v0.4.0~10 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=ffbd90666dc18d72ca0c30ff8b34a629878de6f4;p=python-musicpd.git Ease unitesting with mock --- diff --git a/musicpd.py b/musicpd.py index 864337e..6bb0509 100644 --- a/musicpd.py +++ b/musicpd.py @@ -440,7 +440,7 @@ class MPDClient(object): self._rfile.close() if hasattr(self._wfile, 'close'): self._wfile.close() - if isinstance(self._sock, socket.socket): + if hasattr(self._sock, 'close'): self._sock.close() self._reset()