[Pkg-mpd-commits] [python-mpd] 68/262: mpd.py: always compare self._sock to None
Simon McVittie
smcv at debian.org
Sun May 22 18:16:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch upstream
in repository python-mpd.
commit af6e84c66350a7e833cfc0c0fb3d0d5678777e21
Author: J. Alexander Treuman <jat at spatialrift.net>
Date: Sun Nov 28 21:17:24 2010 -0500
mpd.py: always compare self._sock to None
---
mpd.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mpd.py b/mpd.py
index b87891b..846e3e4 100644
--- a/mpd.py
+++ b/mpd.py
@@ -383,7 +383,7 @@ class MPDClient(object):
raise ConnectionError("getaddrinfo returns an empty list")
def connect(self, host, port):
- if self._sock:
+ if self._sock is not None:
raise ConnectionError("Already connected")
if host.startswith("/"):
self._sock = self._connect_unix(host)
@@ -404,7 +404,7 @@ class MPDClient(object):
self._reset()
def fileno(self):
- if not self._sock:
+ if self._sock is None:
raise ConnectionError("Not connected")
return self._sock.fileno()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git
More information about the Pkg-mpd-commits
mailing list