use py2-compatible way to check for section-existance in tsstats.config.load

* bump version to 0.10.2
This commit is contained in:
Thor77 2016-08-06 21:42:47 +02:00
parent 87f9bf43fc
commit cfb593ba9c
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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))