summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-05-12 21:57:04 +0200
committerDan McGee <dan@archlinux.org>2013-05-12 21:57:04 +0200
commit13bc975d3022ea8e72769ad38de224b9869f5aab (patch)
tree3817c369eaf46bd3e8eac2b5ec3516bcfe4145c9
parentc4d894c85b738df53e8e06e65be48e34572b2f5f (diff)
downloadarchweb-13bc975d3022ea8e72769ad38de224b9869f5aab.tar.gz
archweb-13bc975d3022ea8e72769ad38de224b9869f5aab.tar.xz
Fix reporead issue with temporary database files
We shouldn't be tripping ourselves up on "hidden" files. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead_inotify.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/devel/management/commands/reporead_inotify.py b/devel/management/commands/reporead_inotify.py
index 8c1e47b..6aa4e0e 100644
--- a/devel/management/commands/reporead_inotify.py
+++ b/devel/management/commands/reporead_inotify.py
@@ -192,10 +192,11 @@ class EventHandler(pyinotify.ProcessEvent):
def process_default(self, event):
'''Primary event processing function which kicks off reporead timer
threads if a files database was updated.'''
- if not event.name:
+ name = event.name
+ if not name:
return
- # screen to only the files we care about
- if event.name.endswith('.files.tar.gz'):
+ # screen to only the files we care about, skipping temp files
+ if name.endswith('.files.tar.gz') and not name.startswith('.'):
path = event.pathname
stat = os.stat(path)
database = self.databases.get(path, None)