From 4c171bf0e82c15437317cebda4008aacd944c36e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 3 Feb 2011 21:07:07 +0100 Subject: Ignore files in root directory. --- gitnoti.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gitnoti.py b/gitnoti.py index dfd79c3..5d5f186 100755 --- a/gitnoti.py +++ b/gitnoti.py @@ -185,7 +185,9 @@ class ReposNotifyEvent(pyinotify.ProcessEvent): def process_IN_CREATE(self, event): if os.path.dirname(event.pathname) == root: - self.new_repo(event) + # Ignore files in root directory + if os.path.isdir(event.pathname): + self.new_repo(event) else: self.updated_repo(event) -- cgit v1.2.3