diff options
author | Sebastien Martini <seb@dbzteam.org> | 2010-04-04 23:25:23 +0200 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2010-04-04 23:25:23 +0200 |
commit | a6f14ef16de967cb342057549467feb5a47252ab (patch) | |
tree | 955b968970b68d66211cdfeecd25d63cbe9869bd /python3 | |
parent | c3cb39c167234e651ef20b1647161a073c2b9454 (diff) | |
download | pyinotify-a6f14ef16de967cb342057549467feb5a47252ab.tar.gz |
Fixed dictionary item deletion on iteration (submitted by knurxs@gmx.de).
Diffstat (limited to 'python3')
-rwxr-xr-x | python3/pyinotify.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python3/pyinotify.py b/python3/pyinotify.py index 27fa0fb..4f8fd11 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -546,8 +546,8 @@ class _SysProcessEvent(_ProcessEvent): and self._mv. """ date_cur_ = datetime.now() - for seq in [self._mv_cookie, self._mv]: - for k in seq.keys(): + for seq in (self._mv_cookie, self._mv): + for k in list(seq.keys()): if (date_cur_ - seq[k][1]) > timedelta(minutes=1): log.debug('Cleanup: deleting entry %s', seq[k][0]) del seq[k] |