From 4884184e4a961341029ecbc05a25723690609bba Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 9 Jul 2021 22:47:35 +0200 Subject: [PATCH] fix autolauncher import --- Utils.py | 10 ---------- WebHostLib/autolauncher.py | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Utils.py b/Utils.py index f182a1a5..9a21c896 100644 --- a/Utils.py +++ b/Utils.py @@ -134,16 +134,6 @@ def open_file(filename): subprocess.call([open_command, filename]) -def close_console(): - if sys.platform == 'win32': - # windows - import ctypes.wintypes - try: - ctypes.windll.kernel32.FreeConsole() - except Exception: - pass - - parse_yaml = safe_load unsafe_parse_yaml = functools.partial(load, Loader=Loader) diff --git a/WebHostLib/autolauncher.py b/WebHostLib/autolauncher.py index e3d77500..287e326c 100644 --- a/WebHostLib/autolauncher.py +++ b/WebHostLib/autolauncher.py @@ -7,6 +7,7 @@ import concurrent.futures import sys import typing import time +import os from pony.orm import db_session, select, commit @@ -29,9 +30,6 @@ class AlreadyRunningException(Exception): if sys.platform == 'win32': - import os - - class Locker(CommonLocker): def __enter__(self): try: