Check word document validity before closing.

This commit is contained in:
Bastian Kleineidam 2013-01-07 21:58:02 +01:00
parent 1fba4dce8a
commit a5b6136e70
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,10 @@
8.4 "" (released xx.xx.2013)
Fixes:
- checking: Fix a crash when closing a Word document after scanning failed.
Closes: GH bug #369
8.3 "Mahna Mahna Killer" (released 6.1.2013)
Features:

View file

@ -1094,6 +1094,8 @@ class UrlBase (object):
app = winutil.get_word_app()
try:
doc = winutil.open_wordfile(app, filename)
if doc is None:
raise winutil.Error("could not open word file %r" % filename)
try:
for link in doc.Hyperlinks:
self.add_url(link.Address, name=link.TextToDisplay)