mirror of
https://github.com/netinvent/npbackup.git
synced 2024-09-20 14:56:14 +08:00
Reformat files with black
This commit is contained in:
parent
0fc31247eb
commit
cd673152e7
|
@ -46,7 +46,7 @@ THREAD_SHARED_DICT = {}
|
||||||
|
|
||||||
def _about_gui(version_string: str, config_dict: dict) -> None:
|
def _about_gui(version_string: str, config_dict: dict) -> None:
|
||||||
license_content = LICENSE_TEXT
|
license_content = LICENSE_TEXT
|
||||||
|
|
||||||
result = check_new_version(config_dict)
|
result = check_new_version(config_dict)
|
||||||
if result:
|
if result:
|
||||||
new_version = [
|
new_version = [
|
||||||
|
|
|
@ -181,7 +181,9 @@ def auto_upgrader(
|
||||||
platform_and_arch = "{}/{}".format(get_os(), os_arch()).lower()
|
platform_and_arch = "{}/{}".format(get_os(), os_arch()).lower()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
host_id = "{}/{}/{}".format(auto_upgrade_host_identity, installed_version, group)
|
host_id = "{}/{}/{}".format(
|
||||||
|
auto_upgrade_host_identity, installed_version, group
|
||||||
|
)
|
||||||
id_record = "{}/{}".format(platform_and_arch, host_id)
|
id_record = "{}/{}".format(platform_and_arch, host_id)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
id_record = platform_and_arch
|
id_record = platform_and_arch
|
||||||
|
|
|
@ -51,7 +51,7 @@ def get_current_version() -> Optional[CurrentVersion]:
|
||||||
try:
|
try:
|
||||||
path = os.path.join(config_dict["upgrades"]["data_root"], "VERSION")
|
path = os.path.join(config_dict["upgrades"]["data_root"], "VERSION")
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
with open(path, "r", encoding='utf-8') as fh:
|
with open(path, "r", encoding="utf-8") as fh:
|
||||||
ver = fh.readline()
|
ver = fh.readline()
|
||||||
return CurrentVersion(version=ver)
|
return CurrentVersion(version=ver)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
Loading…
Reference in a new issue