Skip to content

Commit 438b9b7

Browse files
committed
catch OSError in case output file does not exist
1 parent d667a33 commit 438b9b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pdfkit/pdfkit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def to_pdf(self, path=None):
177177
'Check whhtmltopdf output without \'quiet\' '
178178
'option' % ' '.join(args))
179179
return True
180-
except IOError as e:
180+
except (IOError, OSError) as e:
181181
raise IOError('Command failed: %s\n'
182182
'Check whhtmltopdf output without \'quiet\' option\n'
183183
'%s ' %(' '.join(args)),e)

0 commit comments

Comments
 (0)