summaryrefslogtreecommitdiff
path: root/src/leap/mx
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-30 12:29:33 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-30 12:29:33 -0300
commit78f6ca775dc42eba69f2dc1e134ca360c0813aff (patch)
tree9c828cfed3015a570e830de81f11966036467158 /src/leap/mx
parent44fc31656f028942caeca5a9ce55b86ef14b3289 (diff)
Keep file watcher in memory to prevent losing file events
Diffstat (limited to 'src/leap/mx')
-rw-r--r--src/leap/mx/mail_receiver.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/leap/mx/mail_receiver.py b/src/leap/mx/mail_receiver.py
index 77e7cf4..8c39353 100644
--- a/src/leap/mx/mail_receiver.py
+++ b/src/leap/mx/mail_receiver.py
@@ -72,16 +72,16 @@ class MailReceiver(Service):
Starts the MailReceiver service
"""
Service.startService(self)
- wm = inotify.INotify()
- wm.startReading()
+ self.wm = inotify.INotify()
+ self.wm.startReading()
mask = inotify.IN_CREATE
for directory, recursive in self._directories:
log.msg("Watching %s --- Recursive: %s" % (directory, recursive))
- wm.watch(filepath.FilePath(directory), mask,
- callbacks=[self._process_incoming_email],
- recursive=recursive)
+ self.wm.watch(filepath.FilePath(directory), mask,
+ callbacks=[self._process_incoming_email],
+ recursive=recursive)
def _gather_uuid_pubkey(self, results):
if len(results) < 2: