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