Skip to content

Commit

Permalink
Wrapper: Don't unload CLR.
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed Sep 17, 2023
1 parent 0b8106e commit 5c53e9e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions am2r_yams/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,14 @@ def _load_cs_environment():

clr.AddReference("YAMS-LIB")

def _unload_cs_environment():
# Unload dotnet runtime
unload()

@contextmanager
def load_wrapper() -> Wrapper:
try:
_load_cs_environment()
from YAMS_LIB import Patcher as CSharp_Patcher
yield Wrapper(CSharp_Patcher)
except Exception as e:
raise YamsException(str(e)) from None
finally:
_unload_cs_environment
raise e


def _prepare_environment_and_get_data_win_path(folder: str) -> Path:
Expand Down

0 comments on commit 5c53e9e

Please sign in to comment.