[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/develop] Add docstring for crypto._createGPGMEErrorInterpreters().



commit b8e8218e856ebfff94ab6fd1728ba67d54095066
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Tue Apr 22 14:48:39 2014 +0000

    Add docstring for crypto._createGPGMEErrorInterpreters().
---
 lib/bridgedb/crypto.py |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/bridgedb/crypto.py b/lib/bridgedb/crypto.py
index cddc108..606bce2 100644
--- a/lib/bridgedb/crypto.py
+++ b/lib/bridgedb/crypto.py
@@ -243,6 +243,20 @@ def getHMACFunc(key, hex=True):
     return hmac_fn
 
 def _createGPGMEErrorInterpreters():
+    """Create a mapping of GPGME ERRNOs â??â?? human-readable error names/causes.
+
+    This function is called automatically when :mod:`this module
+    <bridgedb.crypto>` is loaded. The resulting dictionary mapping is stored
+    as :attr:`~bridgedb.crypto.gpgmeErrorTranslations`, and is used by
+    :exc:`~bridgedb.crypto.LessCrypticGPGMEError`.
+
+    :returns: A dict of::
+          {str(ERRNO): [ERRORNAME, ANOTHER_ERRORNAME, â?¦],
+           â?¦,
+           str(ERRORNAME): str(ERRNO),
+           â?¦}
+        for all known error numbers and error names/causes.
+    """
     errorDict = {}
     errorAttrs = []
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits