[Pkg-mpd-commits] [python-mpd] 131/262: README: add timeout to client.connect()

Simon McVittie smcv at debian.org
Sun May 22 18:16:37 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 e1db6afddbd34837d5be9321fd34d06bdbc79a40
Author: Jörg Thalheim <jthalheim at gmail.com>
Date:   Sat Mar 31 08:22:12 2012 +0200

    README: add timeout to client.connect()
---
 README.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9741ab4..9e73b63 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,8 @@ The client library can be used as follows:
 
 ```python
 client = mpd.MPDClient()           # create client object
-client.connect("localhost", 6600)  # connect to localhost:6600
+client.connect("localhost", 6600,  # connect to localhost:6600
+                timeout=10)        # optional timeout in seconds (floats allowed), default: None
 print(client.mpd_version)          # print the mpd version
 print(client.find("any", "house")) # print result of the command "find any house"
 client.close()                     # send the close command

-- 
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