diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2018-07-09 10:01:06 -0400 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-07-12 04:38:57 +0000 |
commit | 970ea7a91946be6a8c941b0ebafd34fdb7ca4f44 (patch) | |
tree | 6ee4e075ac53be0903974e9afadb40ded11054f6 /extras/rebalance.py | |
parent | b32ad78516a4edf59a4e9c3ef266e3d69f616b83 (diff) | |
download | glusterfs-970ea7a91946be6a8c941b0ebafd34fdb7ca4f44.tar.gz glusterfs-970ea7a91946be6a8c941b0ebafd34fdb7ca4f44.tar.xz glusterfs-970ea7a91946be6a8c941b0ebafd34fdb7ca4f44.zip |
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/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/, and
https://review.gluster.org/#/c/20441/
Fixes some overlooked string.join()s:
+ AFAICT extras/profiler/glusterfs-profiler, extras/prot_filter.py,
extras/rebalance.py, and extras/volfilter.py would only manifest at
runtime.
+ xlators/experimental/fdl/src/gen_recon.py is a build-time error when
using python3 during the build, thus was not noticed previously when
building with python2.
+ extras/create_new_xlator/generate_xlator.py seems to be example code
and does not affect the build or runtime AFAICT
Note: Fedora packaging guidelines and SUSE rpmlint require explicit
shebangs; popular practices like #!/usr/bin/env python and #!/usr/bin/python
are not allowed; they must be #!/usr/bin/python2 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: Ia1fe2958d136f4303e30f7e7e86b6fe7d7b52c81
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'extras/rebalance.py')
-rwxr-xr-x | extras/rebalance.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/rebalance.py b/extras/rebalance.py index 0023f9970a..6dd364b902 100755 --- a/extras/rebalance.py +++ b/extras/rebalance.py @@ -47,12 +47,12 @@ def generate_stanza (vf, all_xlators, cur_subvol): for sv in cur_subvol.subvols: generate_stanza(vf, all_xlators, sv) sv_list.append(sv.name) - vf.write("volume %s\n"%cur_subvol.name) - vf.write(" type %s\n"%cur_subvol.type) + vf.write("volume %s\n" % cur_subvol.name) + vf.write(" type %s\n" % cur_subvol.type) for kvpair in cur_subvol.opts.items(): - vf.write(" option %s %s\n"%kvpair) + vf.write(" option %s %s\n" % kvpair) if sv_list: - vf.write(" subvolumes %s\n"%string.join(sv_list)) + vf.write(" subvolumes %s\n" % ''.join(sv_list)) vf.write("end-volume\n\n") |