[Pkg-privacy-commits] [pyptlib] 79/136: Document the new checkClientMode().

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:25:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository pyptlib.

commit 39d2a4fe37e1861b738fef8f620aab24ad361962
Author: George Kadianakis <desnacked at riseup.net>
Date:   Sat Aug 17 14:49:06 2013 +0300

    Document the new checkClientMode().
---
 pyptlib/config.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pyptlib/config.py b/pyptlib/config.py
index 31e0fd6..0490d4d 100644
--- a/pyptlib/config.py
+++ b/pyptlib/config.py
@@ -155,6 +155,12 @@ class EnvError(Exception):
     pass
 
 def checkClientMode():
+    """
+    Read the environment and return true if we are supposed to be a
+    client. Return false if we are supposed to be a server.
+
+    Raise EnvError if the environment was not properly set up.
+    """
     if 'TOR_PT_CLIENT_TRANSPORTS' in os.environ: return True
     if 'TOR_PT_SERVER_TRANSPORTS' in os.environ: return False
     raise EnvError('neither TOR_PT_{SERVER,CLIENT}_TRANSPORTS set')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/pyptlib.git



More information about the Pkg-privacy-commits mailing list