Add 'has_embedded_signature' helper method to the GPG class
This commit is contained in:
@@ -278,6 +278,14 @@ class GPG(object):
|
||||
if not destination:
|
||||
return signed_data
|
||||
|
||||
def has_embedded_signature(self, *args, **kwargs):
|
||||
try:
|
||||
self.decrypt_file(*args, **kwargs)
|
||||
except GPGDecryptionError:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def decrypt_file(self, file_input, close_descriptor=True):
|
||||
input_descriptor = GPG.get_descriptor(file_input)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user