Comment 2 for bug 455217

Revision history for this message
Jamu Kakar (jkakar) wrote :

[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!