summaryrefslogtreecommitdiff
path: root/run_weak.py
diff options
context:
space:
mode:
authorJoão Dinis Ferreira <hello@joaof.eu>2021-10-08 15:40:28 +0200
committerJoão Dinis Ferreira <hello@joaof.eu>2021-10-08 15:40:28 +0200
commit4966312dc9fecc145e6cb2e1e0b8fa4932c0e4ad (patch)
treef4d4f7fd6b686ee5bdbe67b56e3f088553f43de2 /run_weak.py
parent3de4b495fb176eba9a0eb517a4ce05903cb67acb (diff)
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
Diffstat (limited to 'run_weak.py')
-rw-r--r--run_weak.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/run_weak.py b/run_weak.py
index 919e9d8..a613675 100644
--- a/run_weak.py
+++ b/run_weak.py
@@ -155,7 +155,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")
@@ -163,7 +163,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: