[1]
+class InvalidGpgSignature(Exception): +class GpgTest(LandscapeTest):
Please use capital letters for abbreviations in type names:
class InvalidGPGSignature(Exception): class GPGTest(LandscapeTest):
[2]
+ def remove_gpg_home(passthrough): + try: + os.remove(os.path.join(gpg_home, "trustdb.gpg")) + except OSError: + # GPG has failed, just pass through whatever failure + pass + os.rmdir(gpg_home) + return passthrough
You can write this a bit more simply as:
import shutil
def remove_gpg_home(ignored): shutil.rmtree(gpg_home) return ignored
Looking good, +1!
[1]
+class InvalidGpgSigna ture(Exception) : LandscapeTest) :
+class GpgTest(
Please use capital letters for abbreviations in type names:
class InvalidGPGSigna ture(Exception) : LandscapeTest) :
class GPGTest(
[2]
+ def remove_ gpg_home( passthrough) : os.path. join(gpg_ home, "trustdb.gpg"))
+ try:
+ os.remove(
+ except OSError:
+ # GPG has failed, just pass through whatever failure
+ pass
+ os.rmdir(gpg_home)
+ return passthrough
You can write this a bit more simply as:
import shutil
def remove_ gpg_home( ignored) :
shutil. rmtree( gpg_home)
return ignored
Looking good, +1!