catch NoSectionError in simple_config
This commit is contained in:
@@ -130,8 +130,11 @@ class SimpleConfig:
|
|||||||
|
|
||||||
p = ConfigParser.ConfigParser()
|
p = ConfigParser.ConfigParser()
|
||||||
p.read(name)
|
p.read(name)
|
||||||
for k, v in p.items('client'):
|
try:
|
||||||
self.system_config[k] = v
|
for k, v in p.items('client'):
|
||||||
|
self.system_config[k] = v
|
||||||
|
except ConfigParser.NoSectionError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def read_user_config(self):
|
def read_user_config(self):
|
||||||
@@ -145,8 +148,11 @@ class SimpleConfig:
|
|||||||
|
|
||||||
p = ConfigParser.ConfigParser()
|
p = ConfigParser.ConfigParser()
|
||||||
p.read(name)
|
p.read(name)
|
||||||
for k, v in p.items('client'):
|
try:
|
||||||
self.user_config[k] = v
|
for k, v in p.items('client'):
|
||||||
|
self.user_config[k] = v
|
||||||
|
except ConfigParser.NoSectionError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def init_path(self, wallet_path):
|
def init_path(self, wallet_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user