summaryrefslogtreecommitdiffstats
path: root/tests/utils
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-06-19 10:56:37 -0400
committerAmar Tumballi <amarts@redhat.com>2018-06-21 05:45:08 +0000
commitfe9b72485697a035b3dbb11b83048dd31de5863e (patch)
tree8b265ee06edbe83c762d0124efd76cdcecebe1cf /tests/utils
parent2bab841316025c402b97c877ccc4ee9188c929e0 (diff)
core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/, https://review.gluster.org/#/c/19871/, https://review.gluster.org/#/c/19952/, https://review.gluster.org/#/c/20104/, https://review.gluster.org/#/c/20162/, https://review.gluster.org/#/c/20185/, https://review.gluster.org/#/c/20207/, https://review.gluster.org/#/c/20227/, and https://review.gluster.org/#/c/20307/ This patch fixes more selected comma white space (ws_comma) as suggested by the 2to3 utility. Note: Fedora packaging guidelines and SUSE rpmlint require explicit shebangs, so popular practices like #!/usr/bin/env python and or #!/usr/bin/python3 Note: Selected small fixes from 2to3 utility. Specifically apply, basestring, funcattrs, has_key, idioms, map, numliterals, raise, set_literal, types, urllib, and zip have already been applied. Also version agnostic imports for urllib, cpickle, socketserver, _thread, queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1 Note: these 2to3 fixes report no changes are necessary: asserts, buffer, exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern, itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren, raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw, tuple_params, xreadlines. Change-Id: I60932030813484803f73733a9b2b7b23c7a843fd updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'tests/utils')
-rwxr-xr-xtests/utils/gfid-access.py2
-rwxr-xr-xtests/utils/setfattr.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/utils/gfid-access.py b/tests/utils/gfid-access.py
index 2a58bfebc4e..6d892a37b2e 100755
--- a/tests/utils/gfid-access.py
+++ b/tests/utils/gfid-access.py
@@ -64,7 +64,7 @@ if __name__ == '__main__':
ftype = sys.argv[5]
uid = int(sys.argv[6])
gid = int(sys.argv[7])
- perm = int(sys.argv[8],8)
+ perm = int(sys.argv[8], 8)
os.chdir(mtpt)
if pargfid == 'ROOT':
diff --git a/tests/utils/setfattr.py b/tests/utils/setfattr.py
index 159218d8bef..9a7daeb1be4 100755
--- a/tests/utils/setfattr.py
+++ b/tests/utils/setfattr.py
@@ -46,7 +46,7 @@ if __name__ == '__main__':
parser.add_option("-x", action="store", dest="xname", type="string",
help="Remove the named extended attribute entirely.")
- (option,args) = parser.parse_args()
+ (option, args) = parser.parse_args()
if not args:
print ("Usage: setfattr {-n name} [-v value] file...")
print (" setfattr {-x name} file...")