From: Tom Hunger Date: Tue, 3 Feb 2015 15:26:20 +0000 (+0000) Subject: Don't throw exception when driver doesn't initialize. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=c1557a0ccc94a0ce80b1312bc6b220031230a4cf;p=sirius.git Don't throw exception when driver doesn't initialize. --- diff --git a/sirius/coding/image_encoding.py b/sirius/coding/image_encoding.py index f6ddd2b..436871e 100644 --- a/sirius/coding/image_encoding.py +++ b/sirius/coding/image_encoding.py @@ -125,7 +125,8 @@ def html_to_png(html): return data finally: - driver.quit() + if driver: + driver.quit() def default_pipeline(html):