[PATCH 7 of 9] docchecker: remove naked except clause

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Wed Feb 10 08:58:45 EST 2016


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1455111869 -32400
#      Wed Feb 10 22:44:29 2016 +0900
# Node ID 4606840cefadab8f4730eee3c6ccda8185168dbc
# Parent  893eef300163d1eda43bd62fe5e5eb1f6fbb3918
docchecker: remove naked except clause

This is fixing for 'naked except clause' check-code rule.

check-code has overlooked this, because a file isn't recognized as one
to be checked (this problem is fixed by subsequent patch).

diff --git a/doc/docchecker b/doc/docchecker
--- a/doc/docchecker
+++ b/doc/docchecker
@@ -48,7 +48,7 @@ def main():
     try:
       with open(f) as file:
         work(file)
-    except:
-      print("failed to process %s" % f)
+    except BaseException as e:
+      print("failed to process %s: %s" % (f, e))
 
 main()


More information about the Mercurial-devel mailing list