diff mercurial/dispatch.py @ 16705:c2d9ef43ff6c

check-code: ignore naked excepts with a "re-raise" comment This also promotes the naked except check from a warning to an error.
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 13:18:06 +0200
parents 67964cda8701
children 1c9f58a6c8f1
line wrap: on
line diff
--- a/mercurial/dispatch.py	Sun May 13 13:17:50 2012 +0200
+++ b/mercurial/dispatch.py	Sun May 13 13:18:06 2012 +0200
@@ -88,7 +88,7 @@
                 return _dispatch(req)
             finally:
                 ui.flush()
-        except:
+        except: # re-raises
             # enter the debugger when we hit an exception
             if '--debugger' in req.args:
                 traceback.print_exc()
@@ -204,7 +204,7 @@
         return inst.code
     except socket.error, inst:
         ui.warn(_("abort: %s\n") % inst.args[-1])
-    except:
+    except: # re-raises
         ui.warn(_("** unknown exception encountered,"
                   " please report by visiting\n"))
         ui.warn(_("**  http://mercurial.selenic.com/wiki/BugTracker\n"))