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