[Pkg-privacy-commits] [pyptlib] 11/136: Fixed some syntax and formatting problems

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:25:00 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 598d4d811d2058b491b0bc4bab2d788dd1f14d8f
Author: Brandon Wiley <brandon at blanu.net>
Date:   Fri Jun 1 13:47:54 2012 -0500

    Fixed some syntax and formatting problems
---
 src/pyptlib/client.py | 2 +-
 src/pyptlib/config.py | 6 +++---
 src/pyptlib/server.py | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/pyptlib/client.py b/src/pyptlib/client.py
index ee88655..40c7a96 100644
--- a/src/pyptlib/client.py
+++ b/src/pyptlib/client.py
@@ -15,7 +15,7 @@ class ClientConfig(Config):
   def __init__(self): # throws EnvError
     Config.__init__(self)
     
-    clientTransports=get('TOR_PT_CLIENT_TRANSPORTS').split(',')
+    clientTransports=self.get('TOR_PT_CLIENT_TRANSPORTS').split(',')
     
   # Returns a list of strings representing the client transports reported by Tor. If present, '*' is stripped from this list and used to set allTransportsEnabled to True.
   def getClientTransports(self):
diff --git a/src/pyptlib/config.py b/src/pyptlib/config.py
index 19c5990..d902d0f 100644
--- a/src/pyptlib/config.py
+++ b/src/pyptlib/config.py
@@ -1,7 +1,7 @@
 import os
 
 """
-Comment
+The base class for the client and server config classes. This class should not be used directly. Instead, use pyptlib.client or pyptlib.server.
 """
 
 __docformat__ = 'restructuredtext'
@@ -12,8 +12,8 @@ class Config:
   allTransportsEnabled=False
   
   def __init__(self): # throws EnvError
-    stateLocation=get('TOR_PT_STATE_LOCATION')
-    managedTransportVer=get('TOR_PT_MANAGED_TRANSPORT_VER').split(',')
+    stateLocation=self.get('TOR_PT_STATE_LOCATION')
+    managedTransportVer=self.get('TOR_PT_MANAGED_TRANSPORT_VER').split(',')
     if '*' in managedTransportVer:
       allTransportsEnabled=True
       managedTransportVer.remove('*')      
diff --git a/src/pyptlib/server.py b/src/pyptlib/server.py
index f95f98e..719e850 100644
--- a/src/pyptlib/server.py
+++ b/src/pyptlib/server.py
@@ -17,15 +17,15 @@ class ServerConfig(Config):
   def __init__(self): # throws EnvError
     Config.__init__(self)
     
-    extendedServerPort=get('TOR_PT_EXTENDED_SERVER_PORT')
-    ORPort=get('TOR_PT_ORPORT')
+    extendedServerPort=self.get('TOR_PT_EXTENDED_SERVER_PORT')
+    ORPort=self.get('TOR_PT_ORPORT')
     
-    binds=get('TOR_PT_SERVER_BINADDR').split(',')
+    binds=self.get('TOR_PT_SERVER_BINADDR').split(',')
     for bind in binds:
       key,value=bind.split(',')
       serverBindAddr[key]=value
     
-    serverTransports=get('TOR_PT_SERVER_TRANSPORTS').split(',')
+    serverTransports=self.get('TOR_PT_SERVER_TRANSPORTS').split(',')
     
   # Returns a tuple (str,int) representing the address of the Tor server port as reported by Tor
   def getExtendedServerPort(self):

-- 
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