[elbe-devel] [PATCH 1/4] db: fix useless statement 'None'

Manuel Traut manut at linutronix.de
Fri Sep 14 13:53:02 CEST 2018


pylint informs about that 'None' is a useless statement. The code
introduced in

--8<--
commit 94f632f5a2109d64e0b819c8f1757a34d2ccda68
Author: Manuel Traut <manut at linutronix.de>
Date:   Tue Dec 16 15:51:13 2014 +0100

    postbuild: add a hook for a postbuild script
--8<--

should return None if the file that should be added to the DB doesn't
exist.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/db.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/db.py b/elbepack/db.py
index fe14195e..334207ad 100644
--- a/elbepack/db.py
+++ b/elbepack/db.py
@@ -885,7 +885,7 @@ class ElbeDB(object):
             f.description = description
         else:
             s.delete(f)
-            None
+            return None
 
         return filename
 
-- 
2.19.0.rc2




More information about the elbe-devel mailing list