diff options
author | Jacek Antonelli | 2010-03-18 02:15:30 -0500 |
---|---|---|
committer | Jacek Antonelli | 2010-03-18 02:15:54 -0500 |
commit | bc1fe099cca6ba81c357ccc764df1648c978ac86 (patch) | |
tree | dbbe88c969c942b49e08416fcc72d78e864041d7 | |
parent | Fixed some i18n issues in the login panel. (diff) | |
download | meta-impy-bc1fe099cca6ba81c357ccc764df1648c978ac86.zip meta-impy-bc1fe099cca6ba81c357ccc764df1648c978ac86.tar.gz meta-impy-bc1fe099cca6ba81c357ccc764df1648c978ac86.tar.bz2 meta-impy-bc1fe099cca6ba81c357ccc764df1648c978ac86.tar.xz |
Manifest files can now be optional.
If required=False, the manifest won't fail if the file is missing.
-rw-r--r-- | linden/indra/lib/python/indra/util/llmanifest.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py index 369cc81..7a2505d 100644 --- a/linden/indra/lib/python/indra/util/llmanifest.py +++ b/linden/indra/lib/python/indra/util/llmanifest.py | |||
@@ -608,7 +608,7 @@ class LLManifest(object): | |||
608 | d = src_re.sub(d_template, s.replace('\\', '/')) | 608 | d = src_re.sub(d_template, s.replace('\\', '/')) |
609 | yield os.path.normpath(s), os.path.normpath(d) | 609 | yield os.path.normpath(s), os.path.normpath(d) |
610 | 610 | ||
611 | def path(self, src, dst=None): | 611 | def path(self, src, dst=None, required=True): |
612 | sys.stdout.write("Processing %s => %s ... " % (src, dst)) | 612 | sys.stdout.write("Processing %s => %s ... " % (src, dst)) |
613 | sys.stdout.flush() | 613 | sys.stdout.flush() |
614 | if src == None: | 614 | if src == None: |
@@ -625,9 +625,10 @@ class LLManifest(object): | |||
625 | assert(s != d) | 625 | assert(s != d) |
626 | count += self.process_file(s, d) | 626 | count += self.process_file(s, d) |
627 | else: | 627 | else: |
628 | # if we're specifying a single path (not a glob), | 628 | # if we're specifying a single path (not a glob), and |
629 | # we should error out if it doesn't exist | 629 | # it's required, error out if it doesn't exist |
630 | self.check_file_exists(src) | 630 | if required: |
631 | self.check_file_exists(src) | ||
631 | # if it's a directory, recurse through it | 632 | # if it's a directory, recurse through it |
632 | if os.path.isdir(src): | 633 | if os.path.isdir(src): |
633 | count += self.process_directory(src, dst) | 634 | count += self.process_directory(src, dst) |