[projects/git-slug: 75/170] Fix for non-existent REFREPO_WDIR

glen glen at pld-linux.org
Mon Sep 21 21:45:07 CEST 2015


commit caa892f5961f11b31bf90ee5054fcae1dd45e36f
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Mon Dec 19 04:46:09 2011 +0000

    Fix for non-existent REFREPO_WDIR

 slug_watch | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/slug_watch b/slug_watch
index ab75aa4..de729bf 100755
--- a/slug_watch
+++ b/slug_watch
@@ -60,9 +60,10 @@ class EventHandler(pyinotify.ProcessEvent):
         process_file(event.pathname)
 
 def run():
-    if not os.path.isdir(WATCHDIR):
-        print('Creating {}'.format(WATCHDIR))
-        os.mkdir(WATCHDIR)
+    for directory in (WATCHDIR, REFREPO_WDIR):
+        if not os.path.isdir(directory):
+            print('Creating {}'.format(directory))
+            os.mkdir(directory)
     notifier = pyinotify.Notifier(wm, EventHandler())
     wdd = wm.add_watch(WATCHDIR, mask, rec=False)
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list