diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2018-06-18 09:17:26 -0400 |
---|---|---|
committer | Prashanth Pai <ppai@redhat.com> | 2018-06-19 12:33:34 +0000 |
commit | f816a6e838f8c52f1b8317ae6f1a4103f9267ba6 (patch) | |
tree | 6e5dc291db9cab744f15fa7029caee6ac94f68e3 /xlators/features/glupy/examples/negative.py | |
parent | 64d21769eef85e2588cbe9481a389dc4d68a3cb1 (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/, and
https://review.gluster.org/#/c/20227/
This patch fixes 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: I691d7f86279572642902650ed1c24840e3c4b781
Updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/features/glupy/examples/negative.py')
-rw-r--r-- | xlators/features/glupy/examples/negative.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xlators/features/glupy/examples/negative.py b/xlators/features/glupy/examples/negative.py index 836008682ba..e04b16aa553 100644 --- a/xlators/features/glupy/examples/negative.py +++ b/xlators/features/glupy/examples/negative.py @@ -29,7 +29,7 @@ class xlator (Translator): def __init__ (self, c_this): self.requests = {} - Translator.__init__(self,c_this) + Translator.__init__(self, c_this) def lookup_fop (self, frame, this, loc, xdata): pargfid = uuid2str(loc.contents.pargfid) @@ -39,12 +39,12 @@ class xlator (Translator): if loc.contents.name in cache[pargfid]: print("short-circuiting for %s:%s" % (pargfid, loc.contents.name)) - dl.unwind_lookup(frame,0,this,-1,2,None,None,None,None) + dl.unwind_lookup(frame, 0, this, -1, 2, None, None, None, None) return 0 key = dl.get_id(frame) self.requests[key] = (pargfid, loc.contents.name[:]) # TBD: get real child xl from init, pass it here - dl.wind_lookup(frame,POINTER(xlator_t)(),loc,xdata) + dl.wind_lookup(frame, POINTER(xlator_t)(), loc, xdata) return 0 def lookup_cbk (self, frame, cookie, this, op_ret, op_errno, inode, buf, @@ -64,8 +64,8 @@ class xlator (Translator): else: cache[pargfid] = {name} del self.requests[key] - dl.unwind_lookup(frame,cookie,this,op_ret,op_errno, - inode,buf,xdata,postparent) + dl.unwind_lookup(frame, cookie, this, op_ret, op_errno, + inode, buf, xdata, postparent) return 0 def create_fop (self, frame, this, loc, flags, mode, umask, fd, xdata): @@ -74,7 +74,7 @@ class xlator (Translator): key = dl.get_id(frame) self.requests[key] = (pargfid, loc.contents.name[:]) # TBD: get real child xl from init, pass it here - dl.wind_create(frame,POINTER(xlator_t)(),loc,flags,mode,umask,fd,xdata) + dl.wind_create(frame, POINTER(xlator_t)(), loc, flags, mode, umask, fd, xdata) return 0 def create_cbk (self, frame, cookie, this, op_ret, op_errno, fd, inode, @@ -88,6 +88,6 @@ class xlator (Translator): if pargfid in cache: cache[pargfid].discard(name) del self.requests[key] - dl.unwind_create(frame,cookie,this,op_ret,op_errno,fd,inode,buf, - preparent,postparent,xdata) + dl.unwind_create(frame, cookie, this, op_ret, op_errno, fd, inode, buf, + preparent, postparent, xdata) return 0 |