Fixing configparser import for Python 3.
This commit is contained in:
parent
41008b3ef4
commit
273ca83f6b
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,11 @@
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Python 2
|
||||||
from ConfigParser import ConfigParser
|
from ConfigParser import ConfigParser
|
||||||
|
except ImportError:
|
||||||
|
# Python 3
|
||||||
|
from configparser import ConfigParser
|
||||||
|
|
||||||
|
|
||||||
CONFIG_SECTION_LOCATION = 'location'
|
CONFIG_SECTION_LOCATION = 'location'
|
||||||
|
|
Loading…
Reference in a new issue