From 915bcfbd305d7b18de07f4f40dab1e49a06b132c Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 1 Oct 2012 12:01:02 +1300 Subject: Add timeout argument to Pathod, and matching -t command-line option. --- pathod | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pathod') diff --git a/pathod b/pathod index 82a7edc0..91cd13e3 100755 --- a/pathod +++ b/pathod @@ -88,7 +88,8 @@ def main(parser, args): noweb = args.noweb, nocraft = args.nocraft, noapi = args.noapi, - nohang = args.nohang + nohang = args.nohang, + timeout = args.timeout ) except pathod.PathodError, v: parser.error(str(v)) @@ -134,6 +135,10 @@ if __name__ == "__main__": "-s", dest='ssl', default=False, action="store_true", help='Serve with SSL.' ) + parser.add_argument( + "-t", dest="timeout", type=int, default=None, + help="Connection timeout" + ) parser.add_argument( "--limit-size", dest='sizelimit', default=None, type=str, help='Size limit of served responses. Understands size suffixes, i.e. 100k.' -- cgit v1.2.3