diff mercurial/keepalive.py @ 16688:cfb6682961b8

cleanup: replace naked excepts with more specific ones
author Brodie Rao <brodie@sf.io>
date Sat, 12 May 2012 16:02:45 +0200
parents e34106fa0dc3
children c2d9ef43ff6c
line wrap: on
line diff
--- a/mercurial/keepalive.py	Sat May 12 16:00:58 2012 +0200
+++ b/mercurial/keepalive.py	Sat May 12 16:02:45 2012 +0200
@@ -758,7 +758,7 @@
     try:
         N = int(sys.argv[1])
         url = sys.argv[2]
-    except:
+    except (IndexError, ValueError):
         print "%s <integer> <url>" % sys.argv[0]
     else:
         test(url, N)