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)
|
usage(exname)
|
||||||
return
|
return
|
||||||
|
|
||||||
dumper = PPTDumper(args[0], globals.params)
|
try:
|
||||||
if not dumper.dump():
|
dumper = PPTDumper(args[0], globals.params)
|
||||||
error("FAILURE\n")
|
if not dumper.dump():
|
||||||
|
error("ppt-dump: dump error\n")
|
||||||
|
except:
|
||||||
|
error("ppt-dump: FAILURE (bad format?)\n")
|
||||||
|
|
||||||
if globals.params.dumpText:
|
if globals.params.dumpText:
|
||||||
print(globals.textdump.replace("\r", "\n"))
|
print(globals.textdump.replace("\r", "\n"))
|
||||||
|
|
||||||
|
|||||||
@ -45,4 +45,8 @@ class XlsXmlHandler(xml.sax.handler.ContentHandler):
|
|||||||
elif name == "worksheet":
|
elif name == "worksheet":
|
||||||
print("")
|
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