mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-20 02:17:20 +08:00
Reformat file with black
This commit is contained in:
parent
0c6a7472bd
commit
8b9b1283f4
1 changed files with 21 additions and 9 deletions
|
@ -194,11 +194,17 @@ async def upgrades(
|
|||
|
||||
if not crud.is_enabled():
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
detail="Service is currently disabled for maintenance"
|
||||
status_code=503, detail="Service is currently disabled for maintenance"
|
||||
)
|
||||
|
||||
file = FileGet(platform=platform, arch=arch, build_type=build_type, auto_upgrade_host_identity=auto_upgrade_host_identity, installed_version=installed_version, group=group)
|
||||
|
||||
file = FileGet(
|
||||
platform=platform,
|
||||
arch=arch,
|
||||
build_type=build_type,
|
||||
auto_upgrade_host_identity=auto_upgrade_host_identity,
|
||||
installed_version=installed_version,
|
||||
group=group,
|
||||
)
|
||||
try:
|
||||
result = crud.get_file(file)
|
||||
if not result:
|
||||
|
@ -260,7 +266,7 @@ async def download(
|
|||
"arch": arch.value,
|
||||
"build_type": build_type.value,
|
||||
}
|
||||
|
||||
|
||||
try:
|
||||
crud.store_host_info(config_dict["upgrades"]["statistics_file"], host_id=data)
|
||||
except KeyError:
|
||||
|
@ -268,11 +274,17 @@ async def download(
|
|||
|
||||
if not crud.is_enabled():
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
detail="Service is currently disabled for maintenance"
|
||||
status_code=503, detail="Service is currently disabled for maintenance"
|
||||
)
|
||||
|
||||
file = FileGet(platform=platform, arch=arch, build_type=build_type, auto_upgrade_host_identity=auto_upgrade_host_identity, installed_version=installed_version, group=group)
|
||||
|
||||
file = FileGet(
|
||||
platform=platform,
|
||||
arch=arch,
|
||||
build_type=build_type,
|
||||
auto_upgrade_host_identity=auto_upgrade_host_identity,
|
||||
installed_version=installed_version,
|
||||
group=group,
|
||||
)
|
||||
try:
|
||||
result = crud.get_file(file, content=True)
|
||||
if not result:
|
||||
|
|
Loading…
Add table
Reference in a new issue