commit b487f67fbc1471f8724b7f5e14583cb9574700f9
Author: Kacper Kornet <[email protected]>
Date:   Mon Jun 25 10:12:35 2012 +0100

    Read watchdir from environment

 post-receive.python.d/slug_hook.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/post-receive.python.d/slug_hook.py 
b/post-receive.python.d/slug_hook.py
index fc49c04..1d9540a 100644
--- a/post-receive.python.d/slug_hook.py
+++ b/post-receive.python.d/slug_hook.py
@@ -1,11 +1,11 @@
 import os
 import tempfile
 
-from git_slug.serverconst import WATCHDIR
-
 
 def run(data):
-    global WATCHDIR
+    WATCHDIR = os.getenv('WATCHDIR')
+    if WATCHDIR is None:
+        print('Envrionment variable WATCHDIR not defined', file=sys.stderr)
     WATCHDIR = os.path.join(os.path.expanduser('~'), WATCHDIR)
     gitrepo = os.environ.get('GL_REPO')
     if gitrepo.startswith('packages/'):
================================================================

---- gitweb:

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to