[Treepkg-commits] r383 - branches/treepkg-status/bin

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jul 27 18:28:23 CEST 2010


Author: bricks
Date: 2010-07-27 18:28:22 +0200 (Tue, 27 Jul 2010)
New Revision: 383

Modified:
   branches/treepkg-status/bin/publishdebianpackages.py
Log:
check if upload hook is empty


Modified: branches/treepkg-status/bin/publishdebianpackages.py
===================================================================
--- branches/treepkg-status/bin/publishdebianpackages.py	2010-07-27 08:54:34 UTC (rev 382)
+++ branches/treepkg-status/bin/publishdebianpackages.py	2010-07-27 16:28:22 UTC (rev 383)
@@ -11,6 +11,7 @@
 
 import os
 import os.path
+import re
 import sys
 import shlex
 
@@ -27,6 +28,8 @@
 from treepkg.info.data import Package
 from treepkg.info.data import CacheDb
 
+EMPTY = re.compile(r'\s*')
+
 config_desc = ["distribution", "section", "num_newest",
                "build_user", "build_host", "build_listpackages",
                "publish_user", "publish_host", 
@@ -230,7 +233,7 @@
     copy_to_publishdir(config, dist, section, None, quiet)
 
     # update apt archive
-    if config["after_upload_hook"]:
+    if not EMPTY.match(config["after_upload_hook"]):
         if not quiet:
             print "running after upload hook"
         call(config["after_upload_hook"])



More information about the Treepkg-commits mailing list