Update docstring and assertion statements for GPG.__init__().

feature/documentation-builds-dirhtml
Isis Lovecruft 2013-03-07 01:07:50 +00:00 committed by Isis Lovecruft
parent 5dba39e0a3
commit c6f8a0bb55
1 changed files with 14 additions and 6 deletions

View File

@ -913,11 +913,19 @@ class GPG(object):
def __init__(self, gpgbinary='gpg', gpghome=None, verbose=False,
use_agent=False, keyring=None, options=None):
"""
Initialize a GPG process wrapper.
Initialize a GnuPG process wrapper.
@type gpgbinary: C{str}
@param gpgbinary: Name for GnuPG binary executable. If the absolute
path is not given, the evironment variable $PATH is
searched for the executable and checked that the
real uid/gid of the user has sufficient permissions.
@type gpghome: C{str}
@param gpghome: Full pathname to directory containing the public and
private keyrings. Default is whatever GnuPG defaults
to.
@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.
@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.
@ -931,11 +939,11 @@ class GPG(object):
self.gpgbinary = that[0] if (len(that) > 0) else None
else:
self.gpgbinary = safe_gpgbinary
assert self.gpgbinary, "Could not find gpgbinary", safe_gpgbinary
assert self.gpgbinary, "Could not find gpgbinary %s" % safe_gpgbinary
if gpghome:
self.gpghome = gpghome
assert _has_readwrite(gpghome), "Need r+w permissions: ", gpghome
assert _has_readwrite(gpghome), "Need read+write: %s" % gpghome
else:
self.gpghome = gpghome