qbicsoftware / dropboxhandler

MIT License
0 stars 1 forks source link

Fix broken iteration in newer python versions #19

Closed KochTobi closed 2 months ago

KochTobi commented 2 months ago

The code was not running because python changed the iteration in a version between 3.6 and 3.9 (probably 3.8). This lead to added or modified keys also included into the iteration. This lead to an exit with unknown key. If modified to know about added keys, newer python versions throw a RuntimeException due to dictionary modification during iteration. This is fixed by shallow copying the dictionary and iterating over the keys of the shallow copy.