diff bin/publishpackages.py @ 318:f70cee73a7ec

Only try to copy package files when there actually are files to copy
author Bernhard Herzog <bh@intevation.de>
date Wed, 09 Dec 2009 17:42:44 +0000
parents 1fcdffbeb9de
children 0862a14df80b
line wrap: on
line diff
--- a/bin/publishpackages.py	Fri Dec 04 14:14:31 2009 +0000
+++ b/bin/publishpackages.py	Wed Dec 09 17:42:44 2009 +0000
@@ -110,20 +110,21 @@
                                      " @track @revision $pkgtype"
                                      " --newest=$num_newest",
                                      runremote=runremote,
-                                     **listpackages_vars)).strip().split("\n")
+                                     **listpackages_vars)).splitlines()
 
     # scp the packages to the cache dir
     cachedir = variables["cachedir"]
     shutil.rmtree(cachedir, ignore_errors=True)
     ensure_directory(cachedir)
-    if variables["build_host"]:
-        userhost = "%(build_user)s@%(build_host)s:" % variables
-        files = [userhost + filename for filename in files]
-    scp_flags = []
-    if quiet:
-        scp_flags.append("-q")
-    call(cmdexpand("scp -p @scp_flags @files $cachedir/", files=files,
-                   scp_flags=scp_flags, **variables))
+    if files:
+        if variables["build_host"]:
+            userhost = "%(build_user)s@%(build_host)s:" % variables
+            files = [userhost + filename for filename in files]
+        scp_flags = []
+        if quiet:
+            scp_flags.append("-q")
+        call(cmdexpand("scp -p @scp_flags @files $cachedir/", files=files,
+                       scp_flags=scp_flags, **variables))
 
 
 def copy_to_publishdir(variables, dist, section, arch, quiet):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)