[elbe-devel] [PATCH v2 49/66] dbaction: Fix Pylint

Olivier Dion dion at linutronix.de
Fri Jun 5 19:07:13 CEST 2020


18:0:   R0205: (useless-object-inheritance)
272:15: W0703: (broad-except)

Signed-off-by: Olivier Dion <dion at linutronix.de>
---
 elbepack/dbaction.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/elbepack/dbaction.py b/elbepack/dbaction.py
index 7cd66314..ac484eee 100644
--- a/elbepack/dbaction.py
+++ b/elbepack/dbaction.py
@@ -14,7 +14,8 @@ from getpass import getpass
 from shutil import copyfileobj
 from elbepack.db import ElbeDB, ElbeDBError
 
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
 class DbAction(object):
 
     actiondict = {}
@@ -120,8 +121,8 @@ class DelUserAction(DbAction):
 
         try:
             userid = int(arg[0])
-        except BaseException:
-            print("userid must be an integer")
+        except ValueError as E:
+            print("userid must be an integer - %s" % E)
             return
 
         db = ElbeDB()
@@ -269,6 +270,7 @@ class BuildAction(DbAction):
             ep = db.load_project(args[0])
             ep.build()
             db.update_project_files(ep)
+        # pylint: disable=broad-except
         except Exception as e:
             db.update_project_files(ep)
             db.reset_busy(args[0], "build_failed")
-- 
2.27.0




More information about the elbe-devel mailing list