[tor-commits] [bridgedb/master] Sphinxify the docstring for bridgedb.EmailServer.getGPGContext().

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:33 UTC 2014


commit ef3baa50e9696f0fd4e01aca682b4d7b8e026c80
Author: Isis Lovecruft <isis at torproject.org>
Date:   Tue Nov 19 05:20:06 2013 +0000

    Sphinxify the docstring for bridgedb.EmailServer.getGPGContext().
---
 lib/bridgedb/EmailServer.py |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/bridgedb/EmailServer.py b/lib/bridgedb/EmailServer.py
index 1ee27c0..b2f2bf5 100644
--- a/lib/bridgedb/EmailServer.py
+++ b/lib/bridgedb/EmailServer.py
@@ -433,11 +433,17 @@ def composeEmail(fromAddr, clientAddr, subject, body, msgID=False,
     return clientAddr, f
 
 def getGPGContext(cfg):
-    """ Returns a gpgme Context() with the signers initialized by the keyfile 
-    specified by the option EMAIL_GPG_SIGNING_KEY in bridgedb.conf, or None
-    if the option was not enabled or unable to initialize.
+    """Import a key from a file and initialise a context for GnuPG operations.
 
-    The key should not be protected by a passphrase.
+    The key should not be protected by a passphrase, and should have the
+    signing flag enabled.
+
+    :type cfg: :class:`bridgedb.persistent.Conf`
+    :param cfg: The loaded config file.
+    :rtype: :class:`gpgme.Context` or None
+    :returns: A GPGME context with the signers initialized by the keyfile
+        specified by the option EMAIL_GPG_SIGNING_KEY in bridgedb.conf, or
+        None if the option was not enabled, or was unable to initialize.
     """
     try:
         # must have enabled signing and specified a key file





More information about the tor-commits mailing list