diff options
author | Jason Stubbs <jstubbs@gentoo.org> | 2005-12-25 12:41:43 +0000 |
---|---|---|
committer | Jason Stubbs <jstubbs@gentoo.org> | 2005-12-25 12:41:43 +0000 |
commit | 3bda2a3500678074ec0e036d4e1e8bcb711f3c9c (patch) | |
tree | c885c074a05118edfac74fc9ffa3836cbe9670d0 | |
parent | 58f079cc8c33f16db7b0f2e77b3835270d6cfe72 (diff) | |
download | portage-3bda2a3500678074ec0e036d4e1e8bcb711f3c9c.tar.gz portage-3bda2a3500678074ec0e036d4e1e8bcb711f3c9c.tar.bz2 portage-3bda2a3500678074ec0e036d4e1e8bcb711f3c9c.zip |
Make dohtml return 1 when a passed file/dir doesn't exist.
svn path=/main/trunk/; revision=2472
-rwxr-xr-x | bin/dohtml | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/dohtml b/bin/dohtml index 963f4465a..5162ba9b0 100755 --- a/bin/dohtml +++ b/bin/dohtml @@ -63,6 +63,10 @@ def install(basename, dirname, options, prefix=""): pfx = basename if prefix: pfx = prefix + "/" + pfx install(i, dirname, options, pfx) + else: + return False + return True + class OptionsClass: def __init__(self): @@ -150,10 +154,19 @@ def main(): print "Document prefix : '" + options.doc_prefix + "'" print "Allowed files :", options.allowed_files + success = True + for x in args: basename = os.path.basename(x) dirname = os.path.dirname(x) - install(basename, dirname, options) + success = success and install(basename, dirname, options) + + if success: + retcode = 0 + else: + retcode = 1 + + sys.exit(retcode) if __name__ == "__main__": main() |