refactor: simplify executable path handling
Removed unnecessary os.path.realpath usage for sys.executable in both manage_hetzner_servers.py and update_local_config.py. This reduces complexity and potential for errors when resolving paths. No significant changes to functionality. This change will make scripts easier to maintain and execute.
This commit is contained in:
parent
5a64f31a1c
commit
bc9c9aeb75
2 changed files with 2 additions and 3 deletions
|
@ -3,7 +3,6 @@ import configparser
|
|||
from hcloud import Client
|
||||
import argparse
|
||||
import pathlib
|
||||
import os
|
||||
import sys
|
||||
|
||||
UPDATE_SCRIPT_PATH = pathlib.Path(__file__).parent / "update_local_config.py"
|
||||
|
@ -27,7 +26,7 @@ def delete_hetzner_server(client, server):
|
|||
|
||||
def run_update_script(provider, location, server_type, interface, config_path):
|
||||
command = [
|
||||
os.path.realpath(sys.executable),
|
||||
sys.executable,
|
||||
UPDATE_SCRIPT_PATH,
|
||||
"--provider",
|
||||
provider,
|
||||
|
|
|
@ -11,7 +11,7 @@ SCRIPT_PATH = pathlib.Path(__file__).parent / "worker.py"
|
|||
|
||||
def execute_script(provider, location, server_type):
|
||||
command = [
|
||||
os.path.realpath(sys.executable),
|
||||
sys.executable,
|
||||
SCRIPT_PATH,
|
||||
"--provider",
|
||||
provider,
|
||||
|
|
Loading…
Reference in a new issue