diff options
author | Torsten Rehn <torsten@rehn.tel> | 2011-07-04 15:14:48 +0200 |
---|---|---|
committer | Torsten Rehn <torsten@rehn.tel> | 2011-07-04 15:14:48 +0200 |
commit | 992cdc75ed8be5650ce5beca902950edd3b961e3 (patch) | |
tree | ab509d1c556357edb3c4c062991dbe80bc579d60 | |
parent | 9070f86fcfa6248971474581f7b47aa1b4854ac4 (diff) | |
download | bcfg2-992cdc75ed8be5650ce5beca902950edd3b961e3.tar.gz bcfg2-992cdc75ed8be5650ce5beca902950edd3b961e3.tar.bz2 bcfg2-992cdc75ed8be5650ce5beca902950edd3b961e3.zip |
prevent KeyErrors when directories get changed by rsync
This wasn't originally anticipated, but if a repository is updated via rsync, HandleEvent() receives 'changed' actions for directories as well. Directories aren't present in self.entries and consequently caused KeyErrors.
-rw-r--r-- | src/lib/Server/Plugin.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py index 3841e637d..a05c537e5 100644 --- a/src/lib/Server/Plugin.py +++ b/src/lib/Server/Plugin.py @@ -927,7 +927,7 @@ class GroupSpool(Plugin, Generator): if not posixpath.isdir(epath): # do not pass through directory events self.entries[ident].handle_event(event) - if action == 'changed': + if action == 'changed' and ident in self.entries: self.entries[ident].handle_event(event) elif action == 'deleted': fbase = self.handles[event.requestID] + event.filename |