From 3bda2a3500678074ec0e036d4e1e8bcb711f3c9c Mon Sep 17 00:00:00 2001 From: Jason Stubbs Date: Sun, 25 Dec 2005 12:41:43 +0000 Subject: [PATCH] Make dohtml return 1 when a passed file/dir doesn't exist. svn path=/main/trunk/; revision=2472 --- bin/dohtml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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() -- 2.26.2