use py2-style ConfigParser-methods
This commit is contained in:
parent
4df012bfb5
commit
4329ad2e11
|
@ -11,9 +11,9 @@ except ImportError:
|
||||||
def parse_config(config_path):
|
def parse_config(config_path):
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read(config_path)
|
config.read(config_path)
|
||||||
if 'General' not in config or not \
|
if not config.has_section('General') or not \
|
||||||
('logfile' in config['General'] and
|
(config.has_option('General', 'logfile') and
|
||||||
'outputfile' in config['General']):
|
config.has_option('General', 'outputfile')):
|
||||||
raise InvalidConfig
|
raise InvalidConfig
|
||||||
|
|
||||||
general = config['General']
|
general = config['General']
|
||||||
|
|
Loading…
Reference in New Issue