From 10a19fc4da5a6fbbfd4a36d0e61d3bc80a38e937 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 26 Sep 2012 14:25:39 +1200 Subject: Refactor print_requests -> print_request - Change to handle one request at a time - Shift error handling around --- pathoc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'pathoc') diff --git a/pathoc b/pathoc index 19f70d4e..89470994 100755 --- a/pathoc +++ b/pathoc @@ -74,14 +74,15 @@ if __name__ == "__main__": continue if args.timeout: p.settimeout(args.timeout) - p.print_requests( - args.request, - showreq=args.showreq, - showresp=args.showresp, - explain=args.explain, - hexdump=args.hexdump, - ) - sys.stdout.flush() + for spec in args.request: + p.print_request( + spec, + showreq=args.showreq, + showresp=args.showresp, + explain=args.explain, + hexdump=args.hexdump, + ) + sys.stdout.flush() except KeyboardInterrupt: pass -- cgit v1.2.3