comboparse: remove test code
This commit is contained in:
@@ -69,20 +69,3 @@ class ComboParser(object):
|
||||
else:
|
||||
sys.stderr.write('warning: assigned default value of "%s" to "%s.%s"\n'%(str(item['default']), item['section'], item['name']))
|
||||
setattr(obj, item['name'], inner)
|
||||
|
||||
|
||||
# TEST CODE
|
||||
def _main():
|
||||
config = ComboParser('config.ini')
|
||||
config.add_item('watchd', 'debug', bool, False, 'turn additional debug info on', False)
|
||||
config.add_item('watchd', 'float', float, 0.1, 'a float test', True)
|
||||
config.add_item('watchd', 'strupp', str, "sup", 'a str test', False)
|
||||
config.add_item('common', 'tor_host', str, '127.0.0.1:9050', 'address of tor proxy', True)
|
||||
config.load()
|
||||
print config.watchd.debug
|
||||
print config.watchd.float
|
||||
print config.watchd.strupp
|
||||
print config.common.tor_host
|
||||
|
||||
if __name__ == '__main__':
|
||||
_main()
|
||||
|
||||
Reference in New Issue
Block a user