2727and so does not work on Windows). Renamed to gnupg.py to avoid confusion with
2828the previous versions.
2929
30- Modifications Copyright (C) 2008-2022 Vinay Sajip. All rights reserved.
30+ Modifications Copyright (C) 2008-2023 Vinay Sajip. All rights reserved.
3131
3232For the full documentation, see https://docs.red-dove.com/python-gnupg/ or
3333https://gnupg.readthedocs.io/
4343import sys
4444import threading
4545
46- __version__ = '0.5.1.dev0 '
46+ __version__ = '0.5.1'
4747__author__ = 'Vinay Sajip'
48- __date__ = '$23-Aug-2022 16:36:40$'
48+ __date__ = '$22-Jul-2023 16:36:40$'
4949
5050STARTUPINFO = None
5151if os .name == 'nt' : # pragma: no cover
@@ -317,11 +317,7 @@ def update_sig_info(**kwargs):
317317 self .valid = False
318318 self .status = 'signature bad'
319319 self .key_id , self .username = value .split (None , 1 )
320- self .problems .append ({
321- 'status' : self .status ,
322- 'keyid' : self .key_id ,
323- 'user' : self .username
324- })
320+ self .problems .append ({'status' : self .status , 'keyid' : self .key_id , 'user' : self .username })
325321 update_sig_info (keyid = self .key_id , username = self .username , status = self .status )
326322 elif key == 'ERRSIG' : # pragma: no cover
327323 self .valid = False
@@ -346,11 +342,7 @@ def update_sig_info(**kwargs):
346342 self .status = 'signature expired'
347343 self .key_id , self .username = value .split (None , 1 )
348344 update_sig_info (keyid = self .key_id , username = self .username , status = self .status )
349- self .problems .append ({
350- 'status' : self .status ,
351- 'keyid' : self .key_id ,
352- 'user' : self .username
353- })
345+ self .problems .append ({'status' : self .status , 'keyid' : self .key_id , 'user' : self .username })
354346 elif key == 'GOODSIG' :
355347 self .valid = True
356348 self .status = 'signature good'
@@ -379,18 +371,12 @@ def update_sig_info(**kwargs):
379371 self .valid = False
380372 self .key_id = value
381373 self .status = 'no public key'
382- self .problems .append ({
383- 'status' : self .status ,
384- 'keyid' : self .key_id
385- })
374+ self .problems .append ({'status' : self .status , 'keyid' : self .key_id })
386375 elif key == 'NO_SECKEY' : # pragma: no cover
387376 self .valid = False
388377 self .key_id = value
389378 self .status = 'no secret key'
390- self .problems .append ({
391- 'status' : self .status ,
392- 'keyid' : self .key_id
393- })
379+ self .problems .append ({'status' : self .status , 'keyid' : self .key_id })
394380 elif key in ('EXPKEYSIG' , 'REVKEYSIG' ): # pragma: no cover
395381 # signed with expired or revoked key
396382 self .valid = False
@@ -401,10 +387,7 @@ def update_sig_info(**kwargs):
401387 self .key_status = 'signing key was revoked'
402388 self .status = self .key_status
403389 update_sig_info (status = self .status , keyid = self .key_id )
404- self .problems .append ({
405- 'status' : self .status ,
406- 'keyid' : self .key_id
407- })
390+ self .problems .append ({'status' : self .status , 'keyid' : self .key_id })
408391 elif key in ('UNEXPECTED' , 'FAILURE' ): # pragma: no cover
409392 self .valid = False
410393 if key == 'UNEXPECTED' :
@@ -437,10 +420,9 @@ def update_sig_info(**kwargs):
437420 # See issue GH-191
438421 self .valid = False
439422 self .status = 'signature expected but not found'
440- elif key in ('DECRYPTION_INFO' , 'PLAINTEXT' , 'PLAINTEXT_LENGTH' ,
441- 'BEGIN_SIGNING' , 'KEY_CONSIDERED' ):
423+ elif key in ('DECRYPTION_INFO' , 'PLAINTEXT' , 'PLAINTEXT_LENGTH' , 'BEGIN_SIGNING' , 'KEY_CONSIDERED' ):
442424 pass
443- elif key in ('NEWSIG' ,):
425+ elif key in ('NEWSIG' , ):
444426 # Only sent in gpg2. Clear any signature ID, to be set by a following SIG_ID
445427 self .signature_id = None
446428 else : # pragma: no cover
@@ -1618,8 +1600,8 @@ def delete_keys(self, fingerprints, secret=False, passphrase=None, expect_passph
16181600
16191601 expect_passphrase (bool): Whether a passphrase is expected.
16201602
1621- exclamation_mode (bool): If specified, a `'!'` is appended to each fingerprint. This deletes only a subkey or
1622- an entire key, depending on what the fingerprint refers to.
1603+ exclamation_mode (bool): If specified, a `'!'` is appended to each fingerprint. This deletes only a subkey
1604+ or an entire key, depending on what the fingerprint refers to.
16231605
16241606 .. note:: Passphrases
16251607
0 commit comments