[Checkins] SVN: zc.buildout/branches/help-api/ - merged svn+ssh://andreasjung at svn.zope.org/repos/main/zc.buildout/branches/ajung-socket-timeout
Godefroid Chapelle
gotcha at bubblenet.be
Sun Mar 29 17:18:16 EDT 2009
Log message for revision 98478:
- merged svn+ssh://andreasjung@svn.zope.org/repos/main/zc.buildout/branches/ajung-socket-timeout
- 1.0.2 release
Changed:
U zc.buildout/branches/help-api/CHANGES.txt
U zc.buildout/branches/help-api/src/zc/buildout/buildout.py
U zc.buildout/branches/help-api/src/zc/buildout/buildout.txt
-=-
Modified: zc.buildout/branches/help-api/CHANGES.txt
===================================================================
--- zc.buildout/branches/help-api/CHANGES.txt 2009-03-29 21:18:09 UTC (rev 98477)
+++ zc.buildout/branches/help-api/CHANGES.txt 2009-03-29 21:18:16 UTC (rev 98478)
@@ -4,12 +4,14 @@
Change History
**************
-1.0.2 (unreleased)
+1.0.2 (2008-05-13)
==================
- More fixes for Windows. A quoted sha-bang is now used on Windows to make the
.exe files work with a Python executable in 'program files'.
+- added "-t <timeout_in_seconde>" option for specifying the socket timeout
+
1.0.1 (2008-04-02)
==================
Modified: zc.buildout/branches/help-api/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/buildout.py 2009-03-29 21:18:09 UTC (rev 98477)
+++ zc.buildout/branches/help-api/src/zc/buildout/buildout.py 2009-03-29 21:18:16 UTC (rev 98478)
@@ -1307,6 +1307,10 @@
This defaults to the file named "buildout.cfg" in the current
working directory.
+ -t socket_timeout
+
+ Specify the socket timeout in seconds.
+
-U
Don't read user defaults.
@@ -1428,15 +1432,30 @@
_help()
op = op[1:]
- if op[:1] == 'c':
+ if op[:1] in ('c', 't'):
+ op_ = op[:1]
op = op[1:]
- if op:
- config_file = op
- else:
- if args:
- config_file = args.pop(0)
+
+ if op_ == 'c':
+ if op:
+ config_file = op
else:
- _error("No file name specified for option", orig_op)
+ if args:
+ config_file = args.pop(0)
+ else:
+ _error("No file name specified for option", orig_op)
+ elif op_ == 't':
+ try:
+ timeout = int(args.pop(0))
+ except IndexError:
+ _error("No timeout value specified for option", orig_op)
+ except ValueError:
+ _error("No timeout value must be numeric", orig_op)
+
+ import socket
+ print 'Setting socket time out to %d seconds' % timeout
+ socket.setdefaulttimeout(timeout)
+
elif op:
if orig_op == '--help':
_help()
Modified: zc.buildout/branches/help-api/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/buildout.txt 2009-03-29 21:18:09 UTC (rev 98477)
+++ zc.buildout/branches/help-api/src/zc/buildout/buildout.txt 2009-03-29 21:18:16 UTC (rev 98478)
@@ -1453,6 +1453,11 @@
The -c option can be used to specify a configuration file, rather than
buildout.cfg in the current directory.
+
+-t socket_timeout
+
+ Specify the socket timeout in seconds.
+
-v
Increment the verbosity by 10. The verbosity is used to adjust
the logging level. The verbosity is subtracted from the numeric
More information about the Checkins
mailing list