diff treepkg/publish.py @ 439:8e0c81870e5e treepkg-status

cleanup modules fix test_info testcases added testcases for remove_trailingslashes and expand_filename
author Bjoern Ricks <bricks@intevation.de>
date Fri, 06 Aug 2010 11:06:08 +0000
parents 9cfa9f64387a
children
line wrap: on
line diff
--- a/treepkg/publish.py	Thu Aug 05 16:21:47 2010 +0000
+++ b/treepkg/publish.py	Fri Aug 06 11:06:08 2010 +0000
@@ -13,15 +13,6 @@
 from treepkg.run import call, capture_output
 from treepkg.cmdexpand import cmdexpand
 
-def remove_trailing_slashes(s):
-    return s.rstrip("/")
-
-def expand_filename(filename):
-    """
-    Applies os.path.expanduser and os.path.expandvars to filename
-    """
-    return os.path.expandvars(os.path.expanduser(filename))
-
 def prefix_for_remote_command(user, host):
     """Returns the ssh call needed to run a command on a remote host.
     If host is empty, the function assumes the command is to be run on
@@ -97,4 +88,8 @@
                    rsync_flags=rsync_flags, remote_destdir=remote_destdir,
                    **variables))
 
+def get_binary_arch(arch):
+    if not arch is None and not arch.startswith("binary") and arch != "source":
+        arch = "binary-" + arch
+    return arch
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)