Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Use iter to iterate over a DictProxy, since python3.5 does not support
Browse files Browse the repository at this point in the history
direct iteration.
  • Loading branch information
jjnicola committed Feb 11, 2020
1 parent a5cc4bf commit ab9f88b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ospd/vtfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def get_filtered_vts_list(
vt_oid_list = list(vts.keys())

for _element, _oper, _filter_val in filters:
vts_generator = (vt for vt in vts)
# Use iter because python3.5 has no support for
# iteration over DictProxy.
vts_generator = (vt for vt in iter(vts.keys()))
for vt_oid in vts_generator:
if vt_oid not in vt_oid_list:
continue
Expand Down

0 comments on commit ab9f88b

Please sign in to comment.