Commit 6a6552ee authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

exit with meaningful status

parent f70ec1ca
......@@ -114,19 +114,26 @@ def main (args):
except getopt.GetoptError:
error("error parsing input options\n")
usage(exname)
return
return false
status = True
try:
dumper = PPTDumper(args[0], globals.params)
if not dumper.dump():
error("ppt-dump: dump error " + args[0] + "\n")
status = False
except:
error("ppt-dump: FAILURE (bad format?) " + args[0] + "\n")
status = False
if globals.params.dumpText:
print(globals.textdump.replace("\r", "\n"))
return(status)
if __name__ == '__main__':
main(sys.argv)
if main(sys.argv):
sys.exit(0)
else:
sys.exit(1)
# vim:set filetype=python shiftwidth=4 softtabstop=4 expandtab:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment