Skip to content

Commit

Permalink
catch IOError raised from PIL as well
Browse files Browse the repository at this point in the history
Appears that it can be IOError.
  • Loading branch information
yuja committed May 30, 2019
1 parent 729138f commit a79143e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinxcontrib/plantuml.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def _get_png_tag(self, fnames, node):
im.load()
styles.extend('%s: %s%s' % (a, w * scale / 100, 'px')
for a, w in zip(['width', 'height'], im.size))
except OSError as err:
except (IOError, OSError) as err:
_warn(self, 'plantuml: failed to get image size: %s' % err)

return ('<a href="%s"><img src="%s" alt="%s" style="%s"/>'
Expand Down

0 comments on commit a79143e

Please sign in to comment.