Skip to content

Commit 4c8be31

Browse files
committed
wrap all in check
Signed-off-by: Francis Williams <francis@fwilliams.info>
1 parent 5f8453e commit 4c8be31

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

fvdb/viz/_viewer_server.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,14 @@ def init(ip_address: str = "127.0.0.1", port: int = 8080, vk_device_id: int = 0,
5858
"""
5959
global _viewer_server_cpp
6060
if _viewer_server_cpp is None:
61-
import nanovdb_editor as editor
62-
63-
compiler = editor.Compiler()
64-
compute = editor.Compute(compiler)
65-
di = compute.device_interface()
66-
di.create_device_manager(enable_validation=False)
6761
try:
62+
import nanovdb_editor as editor
63+
64+
compiler = editor.Compiler()
65+
compute = editor.Compute(compiler)
66+
di = compute.device_interface()
67+
di.create_device_manager(enable_validation=False)
68+
6869
di.create_device(device_index=vk_device_id, enable_external_usage=False)
6970
except Exception as e:
7071
raise RuntimeError(

0 commit comments

Comments
 (0)