[elbe-devel] [PATCH 17/28] pylint: fix unnecessary pass statements

Torben Hohn torben.hohn at linutronix.de
Wed Aug 22 11:29:11 CEST 2018


these pass statements dont do nothing.

However, it might also be possible, that thse should be raise !
Please have a closer look.
---
 elbepack/gpg.py     | 3 ---
 elbepack/virtapt.py | 2 --
 2 files changed, 5 deletions(-)

diff --git a/elbepack/gpg.py b/elbepack/gpg.py
index dd9fb090..3dacb03c 100644
--- a/elbepack/gpg.py
+++ b/elbepack/gpg.py
@@ -155,7 +155,6 @@ def sign(infile, outfile, fingerprint):
         key = ctx.get_key(fingerprint)
     except gpgme.GpgmeError as ex:
         print("no key with fingerprint %s: %s" % (fingerprint, ex.message))
-        pass
 
     ctx.signers = [key]
     ctx.armor = False
@@ -164,7 +163,6 @@ def sign(infile, outfile, fingerprint):
         ctx.sign(infile, outfile, gpgme.SIG_MODE_NORMAL)
     except Exception as ex:
         print("Error signing file %s" % ex.message)
-        pass
 
 
 def sign_file(fname, fingerprint):
@@ -176,7 +174,6 @@ def sign_file(fname, fingerprint):
                 sign(infile, outfile, fingerprint)
     except Exception as ex:
         print("Error signing file %s" % ex.message)
-        pass
 
 
 def get_fingerprints():
diff --git a/elbepack/virtapt.py b/elbepack/virtapt.py
index 5ed2bee8..1a383707 100644
--- a/elbepack/virtapt.py
+++ b/elbepack/virtapt.py
@@ -117,7 +117,6 @@ class VirtApt:
             self.cache.update(self, self.source)
         except BaseException as e:
             print(e)
-            pass
 
         apt_pkg.config.set("APT::Default-Release", suite)
 
@@ -126,7 +125,6 @@ class VirtApt:
             self.cache.update(self, self.source)
         except BaseException as e:
             print(e)
-            pass
 
     def __del__(self):
         os.system('rm -rf "%s"' % self.projectpath)
-- 
2.11.0




More information about the elbe-devel mailing list