mirror of
https://github.com/netinvent/npbackup.git
synced 2024-09-20 06:46:13 +08:00
Reformat files with black
This commit is contained in:
parent
5f211ca0ba
commit
d025a57346
|
@ -107,8 +107,9 @@ def run_upgrade(full_config: dict, ignore_errors: bool = False) -> bool:
|
|||
logger.warning(f"Missing auto upgrade info, cannot launch auto upgrade")
|
||||
return False
|
||||
|
||||
|
||||
evaluated_full_config = npbackup.configuration.evaluate_variables(full_config, full_config)
|
||||
evaluated_full_config = npbackup.configuration.evaluate_variables(
|
||||
full_config, full_config
|
||||
)
|
||||
auto_upgrade_host_identity = evaluated_full_config.g(
|
||||
"global_options.auto_upgrade_host_identity"
|
||||
)
|
||||
|
|
|
@ -148,9 +148,7 @@ def auto_upgrader(
|
|||
if IS_LEGACY:
|
||||
platform_and_arch += "-legacy"
|
||||
try:
|
||||
host_id = "{}/{}/{}".format(
|
||||
auto_upgrade_host_identity, npbackup_version, group
|
||||
)
|
||||
host_id = "{}/{}/{}".format(auto_upgrade_host_identity, npbackup_version, group)
|
||||
id_record = "{}/{}".format(platform_and_arch, host_id)
|
||||
except TypeError:
|
||||
id_record = platform_and_arch
|
||||
|
|
|
@ -124,7 +124,9 @@ async def current_version(
|
|||
)
|
||||
|
||||
|
||||
@app.get("/upgrades/{platform}/{arch}", response_model=Union[FileSend, dict], status_code=200)
|
||||
@app.get(
|
||||
"/upgrades/{platform}/{arch}", response_model=Union[FileSend, dict], status_code=200
|
||||
)
|
||||
@app.get(
|
||||
"/upgrades/{platform}/{arch}/{auto_upgrade_host_identity}",
|
||||
response_model=Union[FileSend, dict],
|
||||
|
|
|
@ -86,7 +86,9 @@ def get_current_version() -> Optional[CurrentVersion]:
|
|||
logger.error("Trace:", exc_info=True)
|
||||
|
||||
|
||||
def get_file(file: FileGet, content: bool = False) -> Optional[Union[FileSend, bytes, dict]]:
|
||||
def get_file(
|
||||
file: FileGet, content: bool = False
|
||||
) -> Optional[Union[FileSend, bytes, dict]]:
|
||||
possible_filename = "npbackup.zip"
|
||||
path = os.path.join(
|
||||
config_dict["upgrades"]["data_root"],
|
||||
|
|
Loading…
Reference in a new issue