Only import ctypes.wintypes on Windows

This commit is contained in:
Shane Lee 2024-02-14 09:19:45 -07:00 committed by Daniel Wozniak
parent 5a42670549
commit 5d3ed5877b

View file

@ -32,14 +32,16 @@ except ImportError:
HAS_GRP = False
try:
import ctypes.wintypes
import salt.utils.win_functions
HAS_WIN_FUNCTIONS = True
except ImportError:
HAS_WIN_FUNCTIONS = False
if sys.platform == "win32":
import ctypes.wintypes
log = logging.getLogger(__name__)