[Treepkg-commits] r244 - trunk/bin

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 9 18:42:45 CET 2009


Author: bh
Date: 2009-12-09 18:42:44 +0100 (Wed, 09 Dec 2009)
New Revision: 244

Modified:
   trunk/bin/publishpackages.py
Log:
Only try to copy package files when there actually are files to copy


Modified: trunk/bin/publishpackages.py
===================================================================
--- trunk/bin/publishpackages.py	2009-12-04 14:14:31 UTC (rev 243)
+++ trunk/bin/publishpackages.py	2009-12-09 17:42:44 UTC (rev 244)
@@ -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):



More information about the Treepkg-commits mailing list