mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-30 23:37:27 +08:00
CLI: Make autoupgrade resume operations after finish
This commit is contained in:
parent
99b7247e6e
commit
6070529cfd
2 changed files with 7 additions and 4 deletions
|
|
@ -551,7 +551,8 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
full_config, ignore_errors=False if args.auto_upgrade else True
|
||||
)
|
||||
if result:
|
||||
sys.exit(0)
|
||||
# This only happens when no upgrade is available
|
||||
logger.info("Upgrade check finished. Resuming operations.")
|
||||
elif args.auto_upgrade:
|
||||
logger.error("Auto upgrade failed")
|
||||
sys.exit(23)
|
||||
|
|
@ -742,7 +743,9 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
if cli_args["operation"]:
|
||||
entrypoint(**cli_args)
|
||||
else:
|
||||
json_error_logging(False, "No operation has been requested", level="warning")
|
||||
json_error_logging(False, "No operation has been requested. Try --help", level="warning")
|
||||
# parser.print_help(sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ __intname__ = "npbackup.upgrade_client.upgrader"
|
|||
__author__ = "Orsiris de Jong"
|
||||
__copyright__ = "Copyright (C) 2023-2024 NetInvent"
|
||||
__license__ = "BSD-3-Clause"
|
||||
__build__ = "2024112601"
|
||||
__build__ = "2024112602"
|
||||
|
||||
|
||||
import os
|
||||
|
|
@ -274,4 +274,4 @@ def auto_upgrader(
|
|||
)
|
||||
logger.debug(cmd)
|
||||
deferred_command(cmd, defer_time=UPGRADE_DEFER_TIME)
|
||||
return True
|
||||
sys.exit(0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue