fix pylint warning '(misplaced-bare-raise) The raise statement is not inside an except clause'
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 10 Oct 2017 13:49:13 +0300
changeset 1861 410a3bcbeb29
parent 1860 4eeddef7f973
child 1862 c4ba411f8c89
fix pylint warning '(misplaced-bare-raise) The raise statement is not inside an except clause'
ProjectController.py
tests/tools/check_source.sh
--- a/ProjectController.py	Tue Oct 10 13:43:55 2017 +0300
+++ b/ProjectController.py	Tue Oct 10 13:49:13 2017 +0300
@@ -1170,7 +1170,7 @@
                 # Do generate
                 code = generator()
                 if code is None:
-                    raise
+                    raise Exception
                 code_path = os.path.join(buildpath, filename)
                 open(code_path, "w").write(code)
                 # Insert this file as first file to be compiled at root confnode
--- a/tests/tools/check_source.sh	Tue Oct 10 13:43:55 2017 +0300
+++ b/tests/tools/check_source.sh	Tue Oct 10 13:49:13 2017 +0300
@@ -238,6 +238,7 @@
     enable=$enable,W0406          # (import-self) Module import itself
     enable=$enable,C0413          # (wrong-import-position) Import "import X" should be placed at the top of the module
     enable=$enable,E1305          # (too-many-format-args) Too many arguments for format string
+    enable=$enable,E0704          # (misplaced-bare-raise) The raise statement is not inside an except clause
     # enable=
 
     options=