From 4966312dc9fecc145e6cb2e1e0b8fa4932c0e4ad Mon Sep 17 00:00:00 2001 From: João Dinis Ferreira Date: Fri, 8 Oct 2021 15:40:28 +0200 Subject: Replace the deprecated .iteritems() with .items() The `.iteritems()` method was [removed](https://docs.python.org/3/library/2to3.html#2to3fixer-dict) in Python 3. The direct replacement is `.items()` (which is backwards-compatible with Python 2). This change means that the execution scripts `run_*.py` fail on Python 3. This commit provides Python 3 compatibility without compromising Python 2 execution. See, for reference: - https://github.com/saltstack-formulas/openssh-formula/issues/48 - https://stackoverflow.com/questions/10458437/what-is-the-difference-between-dict-items-and-dict-iteritems-in-python2 --- run_strong_rank.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'run_strong_rank.py') diff --git a/run_strong_rank.py b/run_strong_rank.py index 6763bc7..68f401e 100644 --- a/run_strong_rank.py +++ b/run_strong_rank.py @@ -115,7 +115,7 @@ def main(): if(len(sys.argv) < 2): print ("Usage: python run.py application") print ("Applications available: ") - for key, value in applications.iteritems(): + for key, value in applications.items(): print (key ) print ("All") @@ -123,7 +123,7 @@ def main(): cmd = sys.argv[1] print ("Application to run is: " + cmd ) if cmd == "All": - for key, value in applications.iteritems(): + for key, value in applications.items(): run(key) os.chdir(rootdir) else: -- cgit v1.2.3