mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-01 13:13:39 +02: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:
@@ -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
|
||||
|
Reference in New Issue
Block a user