summaryrefslogtreecommitdiff
path: root/indra/lib
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-11-06 14:54:27 -0500
committerOz Linden <oz@lindenlab.com>2012-11-06 14:54:27 -0500
commitd35c4f4c9dbea1805cd745725d8c62b0d7ea0ed7 (patch)
tree26d01d35f622ee0991f15ee3ee4f6149ea9c42e4 /indra/lib
parent18002a54be009e7cb0cbd0db4a797038b50c3a8a (diff)
parentca76f9aaf89b4a57c38d81ab6d2d91e91b2fd8a0 (diff)
merge changes for DRTVWR-223
Diffstat (limited to 'indra/lib')
-rw-r--r--indra/lib/python/indra/util/llmanifest.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/lib/python/indra/util/llmanifest.py b/indra/lib/python/indra/util/llmanifest.py
index bfcb259709..97cc31bba0 100644
--- a/indra/lib/python/indra/util/llmanifest.py
+++ b/indra/lib/python/indra/util/llmanifest.py
@@ -626,6 +626,23 @@ class LLManifest(object):
d = src_re.sub(d_template, s.replace('\\', '/'))
yield os.path.normpath(s), os.path.normpath(d)
+ def path2basename(self, path, file):
+ """
+ It is a common idiom to write:
+ self.path(os.path.join(somedir, somefile), somefile)
+
+ So instead you can write:
+ self.path2basename(somedir, somefile)
+
+ Note that this is NOT the same as:
+ self.path(os.path.join(somedir, somefile))
+
+ which is the same as:
+ temppath = os.path.join(somedir, somefile)
+ self.path(temppath, temppath)
+ """
+ return self.path(os.path.join(path, file), file)
+
def path(self, src, dst=None):
sys.stdout.write("Processing %s => %s ... " % (src, dst))
sys.stdout.flush()
@@ -671,6 +688,10 @@ class LLManifest(object):
print "%d files" % count
+ # Let caller check whether we processed as many files as expected. In
+ # particular, let caller notice 0.
+ return count
+
def do(self, *actions):
self.actions = actions
self.construct()