geo-rep: Fix configparser import issue
'configparser' is backported to python2 and can be installed using pip (pip install configparser). So trying to import 'configparser' first and later 'ConfigParser' can cause issues w.r.t unicode strings. Always try importing 'ConfigParser' first and then 'configparser'. This solves python2/python3 compat issues. Change-Id: I2a87c3fc46476296b8cb547338f35723518751cc fixes: bz#1671637 Signed-off-by: Kotresh HR <khiremat@redhat.com>
This commit is contained in:
parent
f87a3e8403
commit
a9b51f2d1f
@ -10,9 +10,9 @@
|
||||
#
|
||||
|
||||
try:
|
||||
from configparser import ConfigParser, NoSectionError
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser, NoSectionError
|
||||
except ImportError:
|
||||
from configparser import ConfigParser, NoSectionError
|
||||
import os
|
||||
from string import Template
|
||||
from datetime import datetime
|
||||
|
Loading…
x
Reference in New Issue
Block a user