mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-20 10:26:19 +08:00
upgrade_client: linter fixes
This commit is contained in:
parent
92cbdd6c92
commit
05f8695736
2 changed files with 6 additions and 7 deletions
|
@ -15,7 +15,7 @@ __version__ = "3.0.0-rc14"
|
|||
|
||||
import sys
|
||||
import psutil
|
||||
from ofunctions.platform import python_arch, get_os_identifier
|
||||
from ofunctions.platform import python_arch, get_os
|
||||
from npbackup.configuration import IS_PRIV_BUILD
|
||||
from npbackup.core.nuitka_helper import IS_COMPILED
|
||||
|
||||
|
@ -32,11 +32,11 @@ version_dict = {
|
|||
"name": __intname__,
|
||||
"version": __version__,
|
||||
"build_type": "priv" if IS_PRIV_BUILD else "pub",
|
||||
"os": get_os_identifier(),
|
||||
"os": get_os(),
|
||||
"arch": python_arch() + ("-legacy" if IS_LEGACY else ""),
|
||||
"pv": sys.version_info,
|
||||
"comp": IS_COMPILED,
|
||||
"build": __build__,
|
||||
"copyright": __copyright__,
|
||||
}
|
||||
version_string = f"{version_dict['name']} {version_dict['version']}-{version_dict['buildtype']}-{version_dict['pv'][0]}.{version_dict['pv'][1]}-{version_dict['arch']}{'-c' if IS_COMPILED else '-i'} {version_dict['build']} - {version_dict['copyright']} running as {CURRENT_USER}"
|
||||
version_string = f"{version_dict['name']} {version_dict['version']}-{version_dict['os']}-{version_dict['arch']}-{version_dict['build_type']}-{version_dict['pv'][0]}.{version_dict['pv'][1]}-{'c' if IS_COMPILED else 'i'} {version_dict['build']} - {version_dict['copyright']} running as {CURRENT_USER}"
|
||||
|
|
|
@ -19,7 +19,6 @@ import tempfile
|
|||
import atexit
|
||||
from datetime import datetime
|
||||
from packaging import version
|
||||
from ofunctions.platform import get_os, python_arch
|
||||
from ofunctions.process import kill_childs
|
||||
from ofunctions.requestor import Requestor
|
||||
from ofunctions.random import random_string
|
||||
|
@ -54,8 +53,8 @@ def _get_target_id(auto_upgrade_host_identity: str, group: str) -> str:
|
|||
if not build_type:
|
||||
logger.critical("Cannot determine build type for upgrade processs")
|
||||
return False
|
||||
target = "{}/{}/{}".format(
|
||||
get_os(),
|
||||
target = "{}/{}/{}/{}".format(
|
||||
version_dict["os"],
|
||||
version_dict["arch"],
|
||||
version_dict["build_type"],
|
||||
version_dict["audience"],
|
||||
|
@ -299,7 +298,7 @@ def auto_upgrader(
|
|||
f'echo "Moving upgraded dist from {upgrade_dist} to {CURRENT_DIR}" >> "{log_file}" 2>&1 && '
|
||||
f'mv -f "{upgrade_dist}" "{CURRENT_DIR}" >> "{log_file}" 2>&1 && '
|
||||
f'echo "Copying optional configuration files from {backup_dist} to {CURRENT_DIR}" >> "{log_file}" 2>&1 && '
|
||||
f'find "{backup_dist}" -name "*.conf" -exec cp --parents {{}} "{CURRENT_DIR}" \; '
|
||||
rf'find "{backup_dist}" -name "*.conf" -exec cp --parents {{}} "{CURRENT_DIR}" \; '
|
||||
f'echo "Adding executable bit to new executable" >> "{log_file}" 2>&1 && '
|
||||
f'chmod +x "{CURRENT_EXECUTABLE}" >> "{log_file}" 2>&1 && '
|
||||
f'echo "Loading new executable {CURRENT_EXECUTABLE} --version" >> "{log_file}" 2>&1 && '
|
||||
|
|
Loading…
Add table
Reference in a new issue