From fb6e8d0d0ca21b16d331fa69da9b9dadf6c5c35d Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 3 Oct 2018 00:45:09 -0400 Subject: georep: python2 to python3 compat - syscalls 1. ctypes/syscalls A) arguments is expected to be encoded B) Raw conversion of return value from bytearray into string 2. struct pack/unpack - Raw converstion of string to bytearray 3. basestring -> str Updates: #411 Change-Id: I80f939adcdec0ed0022c87c0b76d057ad5559e5a Signed-off-by: Kotresh HR --- geo-replication/syncdaemon/monitor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'geo-replication/syncdaemon/monitor.py') diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py index ca2839059a3..c45ef24e59f 100644 --- a/geo-replication/syncdaemon/monitor.py +++ b/geo-replication/syncdaemon/monitor.py @@ -26,7 +26,9 @@ from syncdutils import set_term_handler, GsyncdError from syncdutils import Thread, finalize, Volinfo, VolinfoFromGconf from syncdutils import gf_event, EVENT_GEOREP_FAULTY, get_up_nodes from gsyncdstatus import GeorepStatus, set_monitor_status -from syncdutils import unshare_propagation_supported, pipe +from syncdutils import unshare_propagation_supported +import py2py3 +from py2py3 import pipe ParseError = XET.ParseError if hasattr(XET, 'ParseError') else SyntaxError -- cgit