diff options
author | Kotresh HR <khiremat@redhat.com> | 2019-02-01 12:24:14 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-02-05 04:19:59 +0000 |
commit | a9b51f2d1fd3a8be6496b62b989b6838b542936b (patch) | |
tree | 478a98c4f971b334beea7dc2ebc25fd844c5071a /geo-replication | |
parent | f87a3e840306052a120529ea5a190240179078c1 (diff) |
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>
Diffstat (limited to 'geo-replication')
-rw-r--r-- | geo-replication/syncdaemon/gsyncdconfig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/gsyncdconfig.py b/geo-replication/syncdaemon/gsyncdconfig.py index 5d439a4c5ee..23a1c5769c7 100644 --- a/geo-replication/syncdaemon/gsyncdconfig.py +++ b/geo-replication/syncdaemon/gsyncdconfig.py @@ -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 |