From 4329ad2e1104227fa14e50f1a28f40698b6742e5 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Mon, 9 May 2016 19:25:48 +0200 Subject: [PATCH] use py2-style ConfigParser-methods --- tsstats/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsstats/config.py b/tsstats/config.py index 0ebb1f9..7dd9ad1 100644 --- a/tsstats/config.py +++ b/tsstats/config.py @@ -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']