add an empty "keys" section

This commit is contained in:
lilydjwg 2018-05-06 11:52:10 +08:00
parent 54f474cfb2
commit 26e7160a90

View File

@ -199,6 +199,8 @@ class KeyManager:
self.config = config = configparser.ConfigParser(dict_type=dict)
if file is not None:
config.read([file])
else:
config.add_section('keys')
def get_key(self, name):
return self.config.get('keys', name)