[Nym3-commit] r464 - trunk/nymbaron/Client
laurent at conuropsis.org
laurent at conuropsis.org
Wed Mar 8 21:58:32 CET 2006
Author: laurent
Date: 2006-03-08 21:58:32 +0100 (Wed, 08 Mar 2006)
New Revision: 464
Modified:
trunk/nymbaron/Client/Config.py
Log:
Indentation
Modified: trunk/nymbaron/Client/Config.py
===================================================================
--- trunk/nymbaron/Client/Config.py 2006-03-08 20:57:04 UTC (rev 463)
+++ trunk/nymbaron/Client/Config.py 2006-03-08 20:58:32 UTC (rev 464)
@@ -28,51 +28,51 @@
class Config:
def __init__(self, filename = None):
- #####Default values#####
-
- #Tells the client whether he should send the messages he generates
- # through mixminion
- self.online = True
- #Tells the client whether he should leave the commands sent in temporary
- #files
- self.DEBUG = False
- #The path to the directory containing the user accounts
- self.path = os.environ['HOME'] + '/.nymbaron-account'
+ #####Default values#####
+
+ #Tells the client whether he should send the messages he generates
+ # through mixminion
+ self.online = True
+ #Tells the client whether he should leave the commands sent in temporary
+ #files
+ self.DEBUG = False
+ #The path to the directory containing the user accounts
+ self.path = os.environ['HOME'] + '/.nymbaron-account'
- # Required key length (§ 4.3.4)
- self.idkey_length = 2048
- self.enckey_length = 2048
+ # Required key length (§ 4.3.4)
+ self.idkey_length = 2048
+ self.enckey_length = 2048
- # Default maximum number of synopsis to request in SUMMARIZE command
- self.max_syn = 42
+ # Default maximum number of synopsis to request in SUMMARIZE command
+ self.max_syn = 42
- # Default number of surbs to request in SURB command
- self.nb_surb = 42
+ # Default number of surbs to request in SURB command
+ self.nb_surb = 42
- if filename:
- config = ConfigParser.RawConfigParser()
- config.read(filename)
-
- if config.has_section('general'):
- if config.has_option('general', 'online'):
- self.online = config.getboolean('general', 'online')
- if config.has_option('general', 'DEBUG'):
- self.DEBUG = config.getboolean('general', 'DEBUG')
- if config.has_option('general', 'path'):
- self.path = config.get('general', 'path')
- if config.has_section('crypto'):
- if config.has_option('crypto', 'idkey_length'):
- self.idkey_length = config.getint('crypto',
- 'idkey_length')
- if config.has_option('crypto', 'enckey_length'):
- self.enckey_length = config.getint('crypto',
- 'enckey_length')
- if config.has_section('command'):
- if config.has_option('command', 'max_syn'):
- self.max_syn = config.getint('command', 'max_syn')
- if config.has_option('command', 'nb_surb'):
- self.nb_surb = config.getint('command', 'nb_surb')
-
- self.pubring_path = self.path + os.sep + "pubring"
- self.secring_path = self.path + os.sep + "secring"
+ if filename:
+ config = ConfigParser.RawConfigParser()
+ config.read(filename)
+
+ if config.has_section('general'):
+ if config.has_option('general', 'online'):
+ self.online = config.getboolean('general', 'online')
+ if config.has_option('general', 'DEBUG'):
+ self.DEBUG = config.getboolean('general', 'DEBUG')
+ if config.has_option('general', 'path'):
+ self.path = config.get('general', 'path')
+ if config.has_section('crypto'):
+ if config.has_option('crypto', 'idkey_length'):
+ self.idkey_length = config.getint('crypto',
+ 'idkey_length')
+ if config.has_option('crypto', 'enckey_length'):
+ self.enckey_length = config.getint('crypto',
+ 'enckey_length')
+ if config.has_section('command'):
+ if config.has_option('command', 'max_syn'):
+ self.max_syn = config.getint('command', 'max_syn')
+ if config.has_option('command', 'nb_surb'):
+ self.nb_surb = config.getint('command', 'nb_surb')
+
+ self.pubring_path = self.path + os.sep + "pubring"
+ self.secring_path = self.path + os.sep + "secring"
More information about the Nym3-commit
mailing list