# HG changeset patch # User Brian Neal # Date 1425155747 21600 # Node ID 8fcd278d8987f395fafd2e7680809967c6391730 # Parent 49ebeb54990adac368b178c46f6b12a947d4d45b Add socket timeout option. diff -r 49ebeb54990a -r 8fcd278d8987 core/management/commands/ssl_images.py --- a/core/management/commands/ssl_images.py Sat Feb 28 13:52:46 2015 -0600 +++ b/core/management/commands/ssl_images.py Sat Feb 28 14:35:47 2015 -0600 @@ -274,6 +274,9 @@ make_option('-j', '--j', type='int', help="optional second slice index; the j in [i:j]"), + make_option('-t', '--timeout', + type='int', + help="optional socket timeout (secs)"), ) def handle_noargs(self, **options): @@ -310,7 +313,9 @@ qs = qs[:j] # Set global socket timeout - socket.setdefaulttimeout(30) + timeout = options.get('timeout', 30) + logger.info("Setting socket timeout to %d", timeout) + socket.setdefaulttimeout(timeout) # Install signal handler for ctrl-c signal.signal(signal.SIGINT, signal_handler)