From ffbd90666dc18d72ca0c30ff8b34a629878de6f4 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Thu, 9 May 2013 14:26:54 +0200 Subject: [PATCH] Ease unitesting with mock --- musicpd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.39.5