From cfb593ba9ca34792d1e83b0bdb72c8fd3602b044 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 6 Aug 2016 21:42:47 +0200 Subject: [PATCH] use py2-compatible way to check for section-existance in tsstats.config.load * bump version to 0.10.2 --- setup.py | 2 +- tsstats/config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d6b972a..5dcab56 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='tsstats', - version='0.10.1', + version='0.10.2', author='Thor77', author_email='thor77@thor77.org', description='A simple Teamspeak stats-generator', diff --git a/tsstats/config.py b/tsstats/config.py index 9df3558..6369310 100644 --- a/tsstats/config.py +++ b/tsstats/config.py @@ -36,7 +36,7 @@ def load(path=None): # use this way to set defaults, because ConfigParser.read_dict # is not available < 3.2 for section, items in DEFAULT_CONFIG.items(): - if section not in config: + if section not in config.sections(): config.add_section(section) for key, value in items.items(): config.set(section, key, str(value))