summaryrefslogtreecommitdiffstats
path: root/extras/quota
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-04-13 09:13:16 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2018-05-02 11:28:46 +0000
commit4e7b423d3c3137c3f83b71b36279e1a544154833 (patch)
treee59dc57aa319a5e145161a0e32fba9fc74773e91 /extras/quota
parent9da91172538a2a95fba609c93e199db159fd1938 (diff)
core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/ use print fn from __future__ Change-Id: If5075d8d9ca9641058fbc71df8a52aa35804cda4 updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/quota')
-rwxr-xr-xextras/quota/xattr_analysis.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/extras/quota/xattr_analysis.py b/extras/quota/xattr_analysis.py
index 512fcd39b88..9a178e058c2 100755
--- a/extras/quota/xattr_analysis.py
+++ b/extras/quota/xattr_analysis.py
@@ -7,6 +7,7 @@
# The script takes only one input LOG _FILE generated from the command,
# find <brick_path> | xargs getfattr -d -m. -e hex > log_gluster_xattr
+from __future__ import print_function
import re
import subprocess
import sys
@@ -28,14 +29,14 @@ def get_quota_xattr_brick():
for xattr in pairs:
k = xattr.split("=")[0]
if re.search("# file:",k):
- print xdict
+ print(xdict)
filename=k
- print "=====" + filename + "======="
+ print("=====" + filename + "=======")
xdict = {}
elif k is "":
pass
else:
- print xattr
+ print(xattr)
v = xattr.split("=")[1]
if re.search("contri",k):
if len(v) == 34:
@@ -64,7 +65,7 @@ def get_quota_xattr_brick():
mismatch_size.append((xdict['contri_size'], xdict['size'], filename))
for values in mismatch_size:
- print values
+ print(values)
if __name__ == '__main__':