Skip to content

Commit

Permalink
moved dll load at beginning of clr_module (#2929)
Browse files Browse the repository at this point in the history
Co-authored-by: maxcapodi78 <Shark78>
  • Loading branch information
maxcapodi78 committed Apr 28, 2023
1 parent dd1db46 commit a2378ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pyaedt/generic/clr_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
is_linux = os.name == "posix"
is_windows = not is_linux
is_clr = False
sys.path.append(os.path.join(pyaedt_path, "dlls", "PDFReport"))
if is_linux and cpython: # pragma: no cover
try:
if os.environ.get("DOTNET_ROOT") is None:
Expand Down Expand Up @@ -44,6 +45,7 @@

load("coreclr")
is_clr = True

except:
pass

Expand Down
2 changes: 0 additions & 2 deletions pyaedt/generic/pdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import sys
import warnings

from pyaedt import __version__
Expand All @@ -9,7 +8,6 @@
from pyaedt.generic.clr_module import _clr
from pyaedt.generic.clr_module import is_clr

sys.path.append(os.path.join(pyaedt_path, "dlls", "PDFReport"))
try:
_clr.AddReference("AnsysReport")
from AnsysReport import CreatePdfReport
Expand Down

0 comments on commit a2378ba

Please sign in to comment.