Skip to content

Commit 5d9d379

Browse files
committed
deepzoom-tile: Fail early if jinja2 required and missing
1 parent e3b8cdf commit 5d9d379

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/deepzoom/deepzoom-tile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ class DeepZoomStaticTiler(object):
122122

123123
def __init__(self, slidepath, basename, format, tile_size, overlap,
124124
workers, with_viewer):
125+
if with_viewer:
126+
# Check extra dependency before doing a bunch of work
127+
import jinja2
125128
self._slide = open_slide(slidepath)
126129
self._basename = basename
127130
self._format = format

0 commit comments

Comments
 (0)