Import Windows specific modules only on Windows

This commit is contained in:
shreyamalviya 2021-05-19 17:00:58 +05:30 committed by Shreya
parent e7a26aa2d1
commit 8c575b9d35
1 changed files with 6 additions and 5 deletions

View File

@ -1,15 +1,16 @@
import os
import sys
import ntsecuritycon
import win32api
import win32con
import win32security
from monkey_island.cc.server_utils.consts import DEFAULT_DATA_DIR
is_windows_os = sys.platform.startswith("win")
if is_windows_os:
import ntsecuritycon
import win32api
import win32con
import win32security
def create_data_dir(data_dir: str) -> None:
if not os.path.isdir(data_dir):