catch NoSectionError in simple_config
This commit is contained in:
parent
9f36ef3931
commit
799654dd74
|
@ -130,8 +130,11 @@ class SimpleConfig:
|
||||||
|
|
||||||
p = ConfigParser.ConfigParser()
|
p = ConfigParser.ConfigParser()
|
||||||
p.read(name)
|
p.read(name)
|
||||||
|
try:
|
||||||
for k, v in p.items('client'):
|
for k, v in p.items('client'):
|
||||||
self.system_config[k] = v
|
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)
|
||||||
|
try:
|
||||||
for k, v in p.items('client'):
|
for k, v in p.items('client'):
|
||||||
self.user_config[k] = v
|
self.user_config[k] = v
|
||||||
|
except ConfigParser.NoSectionError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def init_path(self, wallet_path):
|
def init_path(self, wallet_path):
|
||||||
|
|
Loading…
Reference in New Issue