From 48d08d21106545d1f27a9fd5a787a12c9dcf7d7c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 26 Apr 2014 18:44:12 -0400 Subject: client: Don't swallow import errors from the preview module. --- dimension/client.py.in | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/dimension/client.py.in b/dimension/client.py.in index b1a3c60..2b6b084 100644 --- a/dimension/client.py.in +++ b/dimension/client.py.in @@ -27,12 +27,6 @@ import threading from contextlib import contextmanager from dimension import * -have_preview = True -try: - from dimension import preview -except ImportError: - have_preview = False - def main(): """Invoke the client from the command line.""" @@ -167,10 +161,8 @@ def main(): render_message = "Rendering scene (using %d threads)" % scene.nthreads bar = progress_bar_async(render_message, future) if args.preview: - if have_preview: - preview.show_preview(canvas, future) - else: - print("Couldn't display preview window", file = sys.stderr) + from dimension import preview + preview.show_preview(canvas, future) if bar is not None: join_progress_bar(bar) -- cgit v1.2.3