diff --git a/mikecore/__init__.py b/mikecore/__init__.py index d7f9a9f..3f2ae23 100644 --- a/mikecore/__init__.py +++ b/mikecore/__init__.py @@ -41,10 +41,11 @@ eumDLL.libfilepath = mikebin # Only while loading: the DLLs resolve their imports here and load nothing by -# name later. +# name later. sys.platform, not platform.system(), so type checkers know +# os.add_dll_directory exists here. _dll_dir = ( os.add_dll_directory(mikebin) - if platform.system() == "Windows" + if sys.platform == "win32" else contextlib.nullcontext() ) with _dll_dir: