use py2-style ConfigParser-methods

This commit is contained in:
Thor77 2016-05-09 19:25:48 +02:00
parent 4df012bfb5
commit 4329ad2e11
1 changed files with 3 additions and 3 deletions

View File

@ -11,9 +11,9 @@ except ImportError:
def parse_config(config_path):
config = ConfigParser()
config.read(config_path)
if 'General' not in config or not \
('logfile' in config['General'] and
'outputfile' in config['General']):
if not config.has_section('General') or not \
(config.has_option('General', 'logfile') and
config.has_option('General', 'outputfile')):
raise InvalidConfig
general = config['General']