1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

- OscConfigParser: check explicitly for python3 when importing "configparser" (patch by Kay Hayen <kay.hayen@gmail.com>)

There's a another python module around which is also called
"configparser" but which does not seem to be api compatible => so
do not import it.
This commit is contained in:
Marcus Huewe 2013-08-14 15:19:03 +02:00
parent 2be979361e
commit 420f61cdca

View File

@ -15,11 +15,14 @@
from __future__ import print_function
try:
import sys
if sys.version_info >= ( 3, ):
import configparser
except ImportError:
else:
#python 2.x
import ConfigParser as configparser
import re
# inspired from http://code.google.com/p/iniparse/ - although their implementation is