Patchwork [7,of,9] docchecker: remove naked except clause

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Feb. 10, 2016, 1:58 p.m.
Message ID <4606840cefadab8f4730.1455112725@feefifofum>
Download mbox | patch
Permalink /patch/13095/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Katsunori FUJIWARA - Feb. 10, 2016, 1:58 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@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).

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()