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

Torben Hohn torben.hohn at linutronix.de
Wed Jun 10 13:53:19 CEST 2020


On Fri, Jun 05, 2020 at 01:07:13PM -0400, Olivier Dion wrote:
> 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
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
> 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
> 
> 
> _______________________________________________
> elbe-devel mailing list
> elbe-devel at linutronix.de
> https://lists.linutronix.de/mailman/listinfo/elbe-devel

-- 
Torben Hohn
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/kontakt/Datenschutz.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Heinz Egger, Thomas Gleixner



More information about the elbe-devel mailing list