diff mercurial/repair.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 3c738cb162bf
children 0311a6abd38a
line wrap: on
line diff
--- a/mercurial/repair.py	Sun May 13 13:17:50 2012 +0200
+++ b/mercurial/repair.py	Sun May 13 13:18:06 2012 +0200
@@ -131,7 +131,7 @@
                 file, troffset, ignore = tr.entries[i]
                 repo.sopener(file, 'a').truncate(troffset)
             tr.close()
-        except:
+        except: # re-raises
             tr.abort()
             raise
 
@@ -160,7 +160,7 @@
         for m in updatebm:
             bm[m] = repo['.'].node()
         bookmarks.write(repo)
-    except:
+    except: # re-raises
         if backupfile:
             ui.warn(_("strip failed, full bundle stored in '%s'\n")
                     % backupfile)