Fixing configparser import for Python 3.

This commit is contained in:
Dan Helfman 2014-12-01 22:14:35 -08:00
parent 126bb279cd
commit d46e370950

View file

@ -1,5 +1,11 @@
from collections import namedtuple from collections import namedtuple
from ConfigParser import ConfigParser
try:
# Python 2
from ConfigParser import ConfigParser
except ImportError:
# Python 3
from configparser import ConfigParser
CONFIG_SECTION_LOCATION = 'location' CONFIG_SECTION_LOCATION = 'location'