changeset 423:855829a4a2db treepkg-status

check if upload hook is empty
author Bjoern Ricks <bricks@intevation.de>
date Tue, 27 Jul 2010 16:28:22 +0000
parents 7780bde2ec68
children a2ba58ffbfbe
files bin/publishdebianpackages.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bin/publishdebianpackages.py	Tue Jul 27 08:54:34 2010 +0000
+++ b/bin/publishdebianpackages.py	Tue Jul 27 16:28:22 2010 +0000
@@ -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"])
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)