Here is my patch that adds timeout option to debdelta-upgrade.
Best Regards, Mert Dirik
--- debdelta.org 2014-04-04 16:27:22.231196384 +0300 +++ debdelta 2014-04-04 16:48:34.536338815 +0300 @@ -95,6 +95,9 @@ -A accept unsigned deltas --format FORMAT format of created debs +--timeout SECONDS + adjust timeout for connections, default is + 15 seconds """) doc['patch-url']=_("""\ @@ -156,6 +159,7 @@ USE_DELTA_ALGO = 'bsdiff' +TIMEOUT = 15 DEBUG = 0 VERBOSE = 0 KEEP = False @@ -238,7 +242,7 @@ ( opts, argv ) = getopt.getopt(sys.argv[1:], 'vkhdM:n:A' , ('help','info','needsold','dir=','no-act','alt=','old=','delta-algo=', 'max-percent=','deb-policy=','clean-deltas','clean-alt','no-md5','debug','forensicdir=','forensic=', - 'signing-key=', "accept-unsigned", "gpg-home=", "disable-feature=", "test", "format=") ) + 'signing-key=', "accept-unsigned", "gpg-home=", "disable-feature=", "test", "format=", "timeout=") ) except getopt.GetoptError,a: sys.stderr.write(sys.argv[0] +': '+ str(a)+'\n') raise SystemExit(3) @@ -257,6 +261,11 @@ elif o == '--delta-algo': USE_DELTA_ALGO=v elif o == '--max-percent': MAX_DELTA_PERCENT=int(v) elif o == '--deb-policy' : DEB_POLICY = [j[0] for j in v.split(',') if j] + elif o == '--timeout' : + if int(v) < 0: + print 'Error: "--timeout ',int(v),'" is too small.' + raise SystemExit(3) + TIMEOUT = int(v) elif o == '-M' : if int(v) <= 1: print 'Error: "-M ',int(v),'" is too small.' @@ -4207,7 +4216,7 @@ url=urlparse(url)[1] if url not in http_conns: if VERBOSE > 1 : print ' Opening connection to: ',url - http_conns[url] = httplib.HTTPConnection(url, timeout=15) + http_conns[url] = httplib.HTTPConnection(url, timeout=TIMEOUT) return http_conns[url] def conn_close(url,fatal=False):