try to get some indication of fake behavior in the log

This commit is contained in:
Jean-Paul Calderone 2019-02-27 11:47:59 -05:00
parent e822d43808
commit 6ccd9f4b44

View File

@ -74,6 +74,8 @@ def humanReadableMask(mask):
return s
from eliot import start_action
# This class is not copied from Twisted; it acts as a mock.
class INotify(object):
def startReading(self):
@ -89,6 +91,7 @@ class INotify(object):
self.callbacks = callbacks
def event(self, filepath, mask):
with start_action(action_type=u"fake-inotify:event", path=filepath.path, mask=mask):
for cb in self.callbacks:
cb(None, filepath, mask)