From 202d27c5309f2b5a2c4cda4af2e9a1ec85e1e9ad Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Wed, 2 May 2018 08:48:32 -0400 Subject: core/various: python3 compat, prepare for python2 -> python3 see https://review.gluster.org/#/c/19788/ and https://review.gluster.org/#/c/19871/ Selected small fixes from 2to3 utility. Specifically apply, basestring, funcattrs, idioms, numliterals, set_literal, types, urllib, zip Note: these 2to3 fixes report no changes are necessary: exec, execfile, exitfunc, filter, getcwdu, intern, itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren, raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw, tuple_params, xreadlines. Any 2to3 fixes not in the above two lists have more extensive changes which will follow in separate patches. most unicode changes suggested by 2to3 will need to be applied at the same time as changing the shebangs from python2 to python3. Prashanth notes that unicode strings in py2 need 'u' prefix; unicode strings in py3 3.0, 3.1, and 3.2 a 'u' prefix will throw an error, but in py3 3.3+ it is legal (or just ignored). All Linux dists we care about have 3.3 or later so we can leave 'u' prefixes on unicode strings. Change-Id: I49bba2f328b0ee24b9a8115a7183be979981563e updates: #411 Signed-off-by: Kaleb S. KEITHLEY --- api/examples/getvolfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api/examples/getvolfile.py') diff --git a/api/examples/getvolfile.py b/api/examples/getvolfile.py index f1d5761d6b1..9a5dd0d290a 100755 --- a/api/examples/getvolfile.py +++ b/api/examples/getvolfile.py @@ -34,7 +34,7 @@ if __name__ == "__main__": import sys try: - res = apply(get_volfile, sys.argv[1:3]) + res = get_volfile(*sys.argv[1:3]) except: print("fetching volfile failed (volume not started?)") -- cgit