summaryrefslogtreecommitdiff
path: root/indra/lib/python
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-11-09 16:44:49 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-11-09 16:44:49 -0800
commitef26660c3087d848899023e8986db2aec752cf3f (patch)
treeba4e6d0d926636d7c070cd1405cb7e98d0d4e541 /indra/lib/python
parent1cf636f7e712fb5ea1c71130ab1c7427eb9cad7a (diff)
parent42c957e9d823ee5124fa1ac992fc0e803a3b0d9a (diff)
Pull and merge from https://bitbucket.org/lindenlab/viewer-development.
Diffstat (limited to 'indra/lib/python')
-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()