e3c68b
From 30b6d3452df0ef6621592a786f0c4347e09aa8f2 Mon Sep 17 00:00:00 2001
e3c68b
From: Jiffin Tony Thottan <jthottan@redhat.com>
e3c68b
Date: Tue, 11 Jun 2019 12:00:25 +0530
e3c68b
Subject: [PATCH 180/192] ganesha/scripts : Make generate-epoch.py python3
e3c68b
 compatible
e3c68b
e3c68b
This would help in building RHEL8 glusterfs server build. We don't need
e3c68b
to validate this fix as such given RHEL8 glusterfs server support at
e3c68b
RHGS 3.5.0 is an internal milestone.
e3c68b
e3c68b
Label : DOWNSTREAM ONLY
e3c68b
e3c68b
Change-Id: I738219613680406de5c86a452446035c72a52bc4
e3c68b
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
e3c68b
Reviewed-on: https://code.engineering.redhat.com/gerrit/172974
e3c68b
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
e3c68b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e3c68b
---
e3c68b
 extras/ganesha/scripts/generate-epoch.py | 4 ++--
e3c68b
 1 file changed, 2 insertions(+), 2 deletions(-)
e3c68b
e3c68b
diff --git a/extras/ganesha/scripts/generate-epoch.py b/extras/ganesha/scripts/generate-epoch.py
e3c68b
index 5db5e56..61ccda9 100755
e3c68b
--- a/extras/ganesha/scripts/generate-epoch.py
e3c68b
+++ b/extras/ganesha/scripts/generate-epoch.py
e3c68b
@@ -36,13 +36,13 @@ def epoch_uuid():
e3c68b
 
e3c68b
         uuid_bin = binascii.unhexlify(glusterd_uuid.replace("-",""))
e3c68b
 
e3c68b
-        epoch_uuid = int(uuid_bin.encode('hex'), 32) & 0xFFFF0000
e3c68b
+        epoch_uuid = int(binascii.hexlify(uuid_bin), 32) & 0xFFFF0000
e3c68b
         return epoch_uuid
e3c68b
 
e3c68b
 # Construct epoch as follows -
e3c68b
 #        first 32-bit contains the now() time
e3c68b
 #        rest 32-bit value contains the local glusterd node uuid
e3c68b
 epoch = (epoch_now() | epoch_uuid())
e3c68b
-print str(epoch)
e3c68b
+print(str(epoch))
e3c68b
 
e3c68b
 exit(0)
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b