Merge pull request #38 from piotr-dobrogost/master

accessing sys.argv can raise IndexError but not KeyError
This commit is contained in:
Kenneth Reitz
2012-02-26 11:00:45 -08:00
+1 -1
View File
@@ -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)