Skip to content

Commit

Permalink
Avoid mutating dictionary during iteration.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewwardrop committed Oct 4, 2018
1 parent 9775a43 commit 72e91ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion knowledge_repo/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def _verify_headers(self, headers, interactive=False):
"post source file.".format(missing_required_headers)
)

for key, value in headers.items():
for key, value in list(headers.items()):
if value is None:
del headers[key]

Expand Down

0 comments on commit 72e91ec

Please sign in to comment.