catch ppt-dump errors to avoid bogus system reports
This commit is contained in:
parent
e867f855ad
commit
28a4e4d8a8
Binary file not shown.
@ -116,9 +116,13 @@ def main (args):
|
||||
usage(exname)
|
||||
return
|
||||
|
||||
dumper = PPTDumper(args[0], globals.params)
|
||||
if not dumper.dump():
|
||||
error("FAILURE\n")
|
||||
try:
|
||||
dumper = PPTDumper(args[0], globals.params)
|
||||
if not dumper.dump():
|
||||
error("ppt-dump: dump error\n")
|
||||
except:
|
||||
error("ppt-dump: FAILURE (bad format?)\n")
|
||||
|
||||
if globals.params.dumpText:
|
||||
print(globals.textdump.replace("\r", "\n"))
|
||||
|
||||
|
||||
@ -45,4 +45,8 @@ class XlsXmlHandler(xml.sax.handler.ContentHandler):
|
||||
elif name == "worksheet":
|
||||
print("")
|
||||
|
||||
xml.sax.parse(sys.stdin, XlsXmlHandler())
|
||||
try:
|
||||
xml.sax.parse(sys.stdin, XlsXmlHandler())
|
||||
except:
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user