Skip to content

Commit 7d878ff

Browse files
committed
examples/deepzoom_server: Add earlier check for slide file
When run from the command line, verify during startup that a slide file was specified, rather than waiting until the first request.
1 parent 64d8647 commit 7d878ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/deepzoom/deepzoom_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def slugify(text):
156156
try:
157157
app.config['DEEPZOOM_SLIDE'] = args[0]
158158
except IndexError:
159-
pass
159+
if app.config['DEEPZOOM_SLIDE'] is None:
160+
parser.error('No slide file specified')
160161

161162
app.run(host=opts.host, port=opts.port, threaded=True)

0 commit comments

Comments
 (0)