Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow deephaven_legacy to not be installed #2267

Merged
merged 1 commit into from
Apr 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions py/server/deephaven/server/script_session/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Implementation utilities for io.deephaven.engine.util.PythonDeephavenSession
from deephaven_legacy.Plot import FigureWrapper
try:
from deephaven_legacy.Plot import FigureWrapper
except ImportError:
FigureWrapper = None
from jpy import JType

from deephaven._wrapper import JObjectWrapper
Expand Down Expand Up @@ -47,7 +50,7 @@ def unwrap_to_java_type(object):
return object
if isinstance(object, JObjectWrapper):
return object.j_object
if isinstance(object, FigureWrapper):
if FigureWrapper is not None and isinstance(object, FigureWrapper):
return object.figure
# add more here when/if necessary
return None