From 319aa4b0754d1f3859b180f9a416be20143d4ec1 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Mon, 11 Jun 2018 02:52:16 -0400 Subject: geo-rep: Fix problems in python2 -> python3 compat 1. Import configparser module correctly 2. Import thread module correctly Updates: #411 Change-Id: I522453d23c256b694fa58d285f413b8c4dd6595c Signed-off-by: Kotresh HR --- geo-replication/syncdaemon/gsyncdconfig.py | 2 +- geo-replication/syncdaemon/repce.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'geo-replication/syncdaemon') diff --git a/geo-replication/syncdaemon/gsyncdconfig.py b/geo-replication/syncdaemon/gsyncdconfig.py index 8403477dac3..b2517f031ca 100644 --- a/geo-replication/syncdaemon/gsyncdconfig.py +++ b/geo-replication/syncdaemon/gsyncdconfig.py @@ -10,7 +10,7 @@ # try: - from configparser import ConfigParser, NoSectionError + from configparser import configparser as ConfigParser, NoSectionError except ImportError: from ConfigParser import ConfigParser, NoSectionError import os diff --git a/geo-replication/syncdaemon/repce.py b/geo-replication/syncdaemon/repce.py index f819a89bfee..9d5da666858 100644 --- a/geo-replication/syncdaemon/repce.py +++ b/geo-replication/syncdaemon/repce.py @@ -14,9 +14,9 @@ import time import logging from threading import Condition try: - import _thread + import _thread as thread except ImportError: - import thread as _thread + import thread try: from queue import Queue except ImportError: -- cgit