From 0826ed75d9ed282a53d8a6df0aaebd05e8cda208 Mon Sep 17 00:00:00 2001 From: Piotr Dobrogost Date: Sun, 26 Feb 2012 19:48:17 +0100 Subject: [PATCH] this can raise IndexError but not KeyError --- run_httpbin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_httpbin.py b/run_httpbin.py index 3d7641b..1b44eea 100755 --- a/run_httpbin.py +++ b/run_httpbin.py @@ -8,7 +8,7 @@ from httpbin import app try: port = int(sys.argv[1]) -except (KeyError, ValueError): +except (IndexError, ValueError): port = 5000 print 'Starting httpbin on port {0}'.format(port)