future proofing is good, but...
since print() was made a function in py3, i can predict at some point that return will be made a func as well. sure, good. but "return()" *currently* returns an empty tuple. We want to explicitly return None for testing purposes.
This commit is contained in:
@@ -15,7 +15,7 @@ from . import hash_handler
|
||||
def checkMounted(devpath):
|
||||
if devpath in [p.device for p in psutil.disk_partitions(all = True)]:
|
||||
raise RuntimeError('{0} is mounted; we are cowardly refusing to destructive operations on it'.format(devpath))
|
||||
return()
|
||||
return(None)
|
||||
|
||||
|
||||
def collapseKeys(d, keylist = None):
|
||||
|
||||
@@ -40,4 +40,4 @@ class Directory(object):
|
||||
self.dirs.append(dirs)
|
||||
self.dirs.sort()
|
||||
self.files.sort()
|
||||
return()
|
||||
return(None)
|
||||
|
||||
@@ -30,7 +30,7 @@ class GPG(object):
|
||||
self.primary_key = self.createKey('AIF-NG File Verification Key', sign = True, force = True)
|
||||
else:
|
||||
self.primary_key = self.getKey(self.primary_key, secret = True)
|
||||
return()
|
||||
return(None)
|
||||
|
||||
def clean(self):
|
||||
# This is mostly just to cleanup the stuff we did before.
|
||||
@@ -39,7 +39,7 @@ class GPG(object):
|
||||
self.primary_key = None
|
||||
shutil.rmtree(self.homedir)
|
||||
self.gpg = None
|
||||
return()
|
||||
return(None)
|
||||
|
||||
def createKey(self, userid, *args, **kwargs):
|
||||
# algorithm=None, expires_in=0, expires=True, sign=False, encrypt=False, certify=False,
|
||||
@@ -85,7 +85,7 @@ class GPG(object):
|
||||
except gpg.errors.KeyNotFound:
|
||||
key = None
|
||||
return(key)
|
||||
return()
|
||||
return(None)
|
||||
|
||||
def getKeyFile(self, keyfile, keyring_import = False):
|
||||
keyfile = os.path.abspath(os.path.expanduser(keyfile))
|
||||
@@ -115,7 +115,7 @@ class GPG(object):
|
||||
if not isinstance(keydata, list):
|
||||
keydata = [keydata]
|
||||
self.gpg.op_import_keys(keydata)
|
||||
return()
|
||||
return(None)
|
||||
|
||||
def verifyData(self, data, keys = None, strict = False, detached = None, *args, **kwargs):
|
||||
results = {}
|
||||
|
||||
Reference in New Issue
Block a user