]> kaliko git repositories - python-musicpd.git/commitdiff
Ease unitesting with mock
authorKaliko Jack <kaliko@azylum.org>
Thu, 9 May 2013 12:26:54 +0000 (14:26 +0200)
committerKaliko Jack <kaliko@azylum.org>
Thu, 9 May 2013 12:26:54 +0000 (14:26 +0200)
musicpd.py

index 864337e711baeb4ffa1cf05841df5c2acd87d3c0..6bb050990c900c6585bcb3c61ade7aa89eb3d0a2 100644 (file)
@@ -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()