From 8e63ca9bba888df0965f0beeed51a5336e6cb8cd Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Mon, 11 Jun 2018 10:55:42 -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/, and https://review.gluster.org/#/c/20207/ This patch changes uses of has_key() as suggested by the 2to3 utility. Note: Fedora packaging guidelines require explicit shebangs, so 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, idioms, numliterals, set_literal, types, urllib, zip, map, and raise 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. Updates: #411 Change-Id: I79bda20f1583a0a1bb0320667498f4c137de93b3 Signed-off-by: Kaleb S. KEITHLEY --- extras/prot_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/prot_filter.py b/extras/prot_filter.py index bc61c097faf..099832fc08a 100755 --- a/extras/prot_filter.py +++ b/extras/prot_filter.py @@ -126,7 +126,7 @@ if __name__ == "__main__": volume_list.append(extra) graph, last = load(path) for v in volume_list: - if graph.has_key(v): + if v in graph: break else: print("No configured volumes found - aborting.") -- cgit