|
@@ -189,6 +189,13 @@ def dpkg_which(cmd):
|
|
|
assert len(matches) == 1
|
|
|
return matches[0]
|
|
|
|
|
|
+def gpg_decrypt(path, verify=False):
|
|
|
+ import gpg
|
|
|
+ with gpg.Context() as gpg_ctx:
|
|
|
+ with open(path, 'rb') as f:
|
|
|
+ data, decrypt_result, verify_result = gpg_ctx.decrypt(f, verify=verify)
|
|
|
+ return data
|
|
|
+
|
|
|
def locate(*patterns, match_all=True, ignore_case=True):
|
|
|
params = []
|
|
|
if match_all:
|