Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 2, 2024
1 parent d79046c commit f2bb7d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/autotest_server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,11 @@ def ignore_missing_dir_error(
if err_type == FileNotFoundError:
return
raise err_inst


logger = logging.getLogger(__name__)


def update_test_settings(user, settings_id, test_settings, file_url):
try:
settings_dir = os.path.join(TEST_SCRIPT_DIR, str(settings_id))
Expand All @@ -397,8 +400,8 @@ def update_test_settings(user, settings_id, test_settings, file_url):
default_env = os.path.join(TEST_SCRIPT_DIR, DEFAULT_ENV_DIR)
if not os.path.isdir(default_env):
subprocess.run([sys.executable, "-m", "venv", default_env], check=True)
requirements_path = os.path.join(os.path.dirname(__file__), '../requirements.txt')
subprocess.run([f"{default_env}/bin/pip", 'install', '-r', requirements_path], check=True)
requirements_path = os.path.join(os.path.dirname(__file__), "../requirements.txt")
subprocess.run([f"{default_env}/bin/pip", "install", "-r", requirements_path], check=True)
try:
tester_settings["_env"] = tester_install.create_environment(tester_settings, env_dir, default_env)
except Exception as e:
Expand Down

0 comments on commit f2bb7d8

Please sign in to comment.