summaryrefslogtreecommitdiff
path: root/ptr.py
diff options
context:
space:
mode:
authorEric Brunson <brunson@brunson.com>2016-10-24 08:00:52 -0600
committerJason R. Coombs <jaraco@jaraco.com>2016-10-24 10:00:52 -0400
commit66a11081bfa8d9f873ab21ee011404262adedb2b (patch)
treeabd351ce7d708f4e388a45662d61ba63a4e9b03f /ptr.py
parent6680c4b7c7ec9ae51e268f335db992ec5f8e4ac2 (diff)
downloadpytest-runner-66a11081bfa8d9f873ab21ee011404262adedb2b.tar.gz
prevent mutating opts while iterating (#21)
Mutating a dict while iterating over its keys causes a RuntimeError in python 3. This update creates a list of keys to iterate over.
Diffstat (limited to 'ptr.py')
-rw-r--r--ptr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ptr.py b/ptr.py
index 2e4ac3b..52fb7b4 100644
--- a/ptr.py
+++ b/ptr.py
@@ -165,7 +165,7 @@ class PyTest(orig.test):
'find_links', 'site_dirs', 'index_url', 'optimize',
'site_dirs', 'allow_hosts'
)
- for key in opts.keys():
+ for key in list(opts.keys()):
if key not in keep:
del opts[key] # don't use any other settings
if main_dist.dependency_links: