summaryrefslogtreecommitdiff
path: root/indra/lib
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2018-09-07 11:58:11 -0400
committerOz Linden <oz@lindenlab.com>2018-09-07 11:58:11 -0400
commit9f27bff9fb82aa56fd61f95dc57fca1e119ef767 (patch)
treec180b383b0f4ccbd795c4bdcdc607ad1220f9959 /indra/lib
parentfac16e53f6b806245b16229b53eb325a5875fc59 (diff)
make the path output strip the 'dest' prefix
Diffstat (limited to 'indra/lib')
-rwxr-xr-xindra/lib/python/indra/util/llmanifest.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index 8904e72440..9569014a47 100755
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -500,6 +500,19 @@ class LLManifest(object):
relative to the destination directory."""
return os.path.join(self.get_dst_prefix(), relpath)
+ def _relative_dst_path(self, dstpath):
+ """
+ Returns the path to a file or directory relative to the destination directory.
+ This should only be used for generating diagnostic output in the path method.
+ """
+ dest_root=self.dst_prefix[0]
+ if dstpath.startswith(dest_root+os.path.sep):
+ return dstpath[len(dest_root)+1:]
+ elif dstpath.startswith(dest_root):
+ return dstpath[len(dest_root):]
+ else:
+ return dstpath
+
def ensure_src_dir(self, reldir):
"""Construct the path for a directory relative to the
source path, and ensures that it exists. Returns the
@@ -790,7 +803,7 @@ class LLManifest(object):
if dst == None:
dst = src
dst = os.path.join(self.get_dst_prefix(), dst)
- sys.stdout.write("Processing %s => %s ... " % (src, dst))
+ sys.stdout.write("Processing %s => %s ... " % (src, self._relative_dst_path(dst)))
def try_path(src):
# expand globs