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:
parent
2be979361e
commit
420f61cdca
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user