Mercurial > code > home > repos > light9
changeset 855:222b9fee8fcb
merge graphfile.py
Ignore-this: f84fae4f674467e8f05c7afab327d00a
author | drewp@bigasterisk.com |
---|---|
date | Wed, 05 Jun 2013 23:39:12 +0000 |
parents | d098574272fc |
children | a59d0f4563cc |
files | light9/rdfdb/graphfile.py |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/light9/rdfdb/graphfile.py Wed Jun 05 23:34:49 2013 +0000 +++ b/light9/rdfdb/graphfile.py Wed Jun 05 23:39:12 2013 +0000 @@ -50,8 +50,17 @@ callbacks=[self.notify]) def notify(self, notifier, filepath, mask): - if filepath.getModificationTime() == self.lastWriteTimestamp: - log.debug("file %s changed, but we did this write", filepath) + # this is from some other version, and I forget the point. Delete +# mask = humanReadableMask(mask) +# if mask[0] in ['open', 'access', 'close_nowrite', 'attrib', 'delete_self']: +# return + + try: + if filepath.getModificationTime() == self.lastWriteTimestamp: + log.debug("file %s changed, but we did this write", filepath) + return + except OSError as e: + log.error("watched file %s: %r" % (filepath, e)) return log.info("file %s changed", filepath)