From fe9b72485697a035b3dbb11b83048dd31de5863e Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Tue, 19 Jun 2018 10:56:37 -0400 Subject: 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 --- tests/features/ipctest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/features') diff --git a/tests/features/ipctest.py b/tests/features/ipctest.py index 4417493a0ae..b64d4f86895 100755 --- a/tests/features/ipctest.py +++ b/tests/features/ipctest.py @@ -3,18 +3,18 @@ from __future__ import print_function import ctypes -api = ctypes.CDLL("libgfapi.so",mode=ctypes.RTLD_GLOBAL) +api = ctypes.CDLL("libgfapi.so", mode=ctypes.RTLD_GLOBAL) api.glfs_ipc.argtypes = [ ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p ] api.glfs_ipc.restype = ctypes.c_int def do_ipc (host, volume): fs = api.glfs_new(volume) - #api.glfs_set_logging(fs,"/dev/stderr",7) - api.glfs_set_volfile_server(fs,"tcp",host,24007) + #api.glfs_set_logging(fs, "/dev/stderr", 7) + api.glfs_set_volfile_server(fs, "tcp", host, 24007) api.glfs_init(fs) - ret = api.glfs_ipc(fs,1470369258,0,0) + ret = api.glfs_ipc(fs, 1470369258, 0, 0) api.glfs_fini(fs) return ret -- cgit