mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 18:06: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
|
from __future__ import print_function
|
||||||
|
|
||||||
try:
|
import sys
|
||||||
|
|
||||||
|
if sys.version_info >= ( 3, ):
|
||||||
import configparser
|
import configparser
|
||||||
except ImportError:
|
else:
|
||||||
#python 2.x
|
#python 2.x
|
||||||
import ConfigParser as configparser
|
import ConfigParser as configparser
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
# inspired from http://code.google.com/p/iniparse/ - although their implementation is
|
# inspired from http://code.google.com/p/iniparse/ - although their implementation is
|
||||||
|
Loading…
Reference in New Issue
Block a user