Cleanup coding style and docstrings in old module code.

feature/documentation-builds-dirhtml
Isis Lovecruft 2013-03-05 00:07:50 +00:00
parent 9e851f796d
commit 25e3949633
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 18 additions and 23 deletions

View File

@ -498,40 +498,35 @@ class Sign(object):
"GOOD_PASSPHRASE", "BEGIN_SIGNING", "CARDCTRL", "INV_SGNR"):
pass
elif key == "SIG_CREATED":
(self.type,
algo, hashalgo, cls,
self.timestamp, self.fingerprint
) = value.split()
(self.type, algo, hashalgo, cls, self.timestamp,
self.fingerprint) = value.split()
else:
raise ValueError("Unknown status message: %r" % key)
class GPG(object):
"""Encapsulate access to the gpg executable"""
decode_errors = 'strict'
result_map = {
'crypt': Crypt,
result_map = {'crypt': Crypt,
'delete': DeleteResult,
'generate': GenKey,
'import': ImportResult,
'list': ListKeys,
'sign': Sign,
'verify': Verify,
}
'verify': Verify,}
"Encapsulate access to the gpg executable"
def __init__(self, gpgbinary='gpg', gnupghome=None, verbose=False,
use_agent=False, keyring=None, options=None):
"""Initialize a GPG process wrapper. Options are:
"""
Initialize a GPG process wrapper.
gpgbinary -- full pathname for GPG binary.
gnupghome -- full pathname to where we can find the public and
@param gpgbinary: Full pathname for GPG binary.
@param gnupghome: Full pathname to where we can find the public and
private keyrings. Default is whatever gpg defaults to.
keyring -- name of alternative keyring file to use. If specified,
@param keyring: Name of alternative keyring file to use. If specified,
the default keyring is not used.
options =-- a list of additional options to pass to the GPG binary.
@options: A list of additional options to pass to the GPG binary.
"""
self.gpgbinary = gpgbinary
self.gnupghome = gnupghome