Changeset - 9f771db2b0b6
[Not reviewed]
default
0 1 0
Drew Perttula - 12 years ago 2013-06-06 03:19:40
drewp@bigasterisk.com
don't react to inotify events that are just us reading the file
Ignore-this: 5bbb75a72e2db038b1891c5aa7cce8b0
1 file changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
light9/rdfdb/graphfile.py
Show inline comments
 
@@ -50,10 +50,9 @@ class GraphFile(object):
 
                       callbacks=[self.notify])
 
      
 
    def notify(self, notifier, filepath, mask):
 
        # 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
 
        maskNames = humanReadableMask(mask)
 
        if maskNames[0] in ['open', 'access', 'close_nowrite', 'attrib', 'delete_self']:
 
            return
 

	
 
        try:
 
            if filepath.getModificationTime() == self.lastWriteTimestamp:
 
@@ -63,7 +62,7 @@ class GraphFile(object):
 
            log.error("watched file %s: %r" % (filepath, e))
 
            return
 
            
 
        log.info("file %s changed", filepath)
 
        log.info("file %s changed (%s)", filepath, maskNames)
 
        try:
 
            self.reread()
 
        except Exception:
0 comments (0 inline, 0 general)