[Pkg-mpd-commits] [python-mpd] 30/262: mpd.py: raise ConnectionError if connect() is called when already connected
Simon McVittie
smcv at debian.org
Sun May 22 18:16:21 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 4f4b01dd0d04a341f6834fdca4d777ff5d6850db
Author: J. Alexander Treuman <jat at spatialrift.net>
Date: Sun Mar 23 16:01:31 2008 -0400
mpd.py: raise ConnectionError if connect() is called when already connected
---
mpd.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mpd.py b/mpd.py
index 33449ca..ce1784b 100644
--- a/mpd.py
+++ b/mpd.py
@@ -288,7 +288,7 @@ class MPDClient(object):
def connect(self, host, port):
if self._sock:
- self.disconnect()
+ raise ConnectionError, "Already connected"
self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self._sock.connect((host, port))
self._rfile = self._sock.makefile("rb")
--
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