Rev3745, Fix tor bridges config file parsing with True value

This commit is contained in:
shortcutme 2019-01-02 01:21:00 +01:00
parent d1227b6447
commit 9b6feb4a01
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -13,7 +13,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.6.4" self.version = "0.6.4"
self.rev = 3744 self.rev = 3745
self.argv = argv self.argv = argv
self.action = None self.action = None
self.pending_changes = {} self.pending_changes = {}
@ -395,6 +395,8 @@ class Config(object):
config.read(self.config_file) config.read(self.config_file)
for section in config.sections(): for section in config.sections():
for key, val in config.items(section): for key, val in config.items(section):
if val == "True":
val = None
if section != "global": # If not global prefix key with section if section != "global": # If not global prefix key with section
key = section + "_" + key key = section + "_" + key