pytan icon indicating copy to clipboard operation
pytan copied to clipboard

iteritems causing "dictionary changed size during iteration" runtime error

Open perkyswenson opened this issue 8 years ago • 0 comments

With python 2.7.10 on the windows platform, the following line within handler.py throws a "dictionary changed size during iteration" runtime error.

for k, v in locals().iteritems():

Changing iteritems() to items() seems to eliminate the issue.

for k, v in locals().items():

I only have access to the Windows platform within the environment in which I also have access to Tanium. So I can't test other platforms. I have had a peer on Mac state that they don't encounter the issue.

The switch to .items() also mirrors the recommendation found in pep 3106.

perkyswenson avatar Apr 11 '17 23:04 perkyswenson