mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-11 15:34:57 +08:00
upgrade_client: Make sure we allow future deployment server
This commit is contained in:
parent
1a9f1284d0
commit
e637a27329
2 changed files with 5 additions and 2 deletions
|
@ -41,3 +41,6 @@ if not "BUILD_TYPE" in globals():
|
|||
def set_build_type(build_type: str) -> None:
|
||||
global BUILD_TYPE
|
||||
BUILD_TYPE = build_type
|
||||
|
||||
|
||||
ALLOWED_UPGRADE_SERVER_IDS = ("npbackup.upgrader", "npbackup.deployment_server")
|
||||
|
|
|
@ -26,7 +26,7 @@ from command_runner import deferred_command
|
|||
from npbackup.path_helper import CURRENT_DIR, CURRENT_EXECUTABLE
|
||||
from npbackup.__version__ import version_dict, IS_COMPILED
|
||||
from npbackup.__debug__ import _NPBACKUP_ALLOW_AUTOUPGRADE_DEBUG
|
||||
from npbackup.__env__ import UPGRADE_DEFER_TIME
|
||||
from npbackup.__env__ import UPGRADE_DEFER_TIME, ALLOWED_UPGRADE_SERVER_IDS
|
||||
|
||||
logger = getLogger()
|
||||
|
||||
|
@ -102,7 +102,7 @@ def _check_new_version(
|
|||
return None
|
||||
|
||||
try:
|
||||
if not server_ident["app"] == "npbackup.upgrader":
|
||||
if not server_ident["app"] in ALLOWED_UPGRADE_SERVER_IDS:
|
||||
msg = "Current server is not a recognized NPBackup update server"
|
||||
if ignore_errors:
|
||||
logger.info(msg)
|
||||
|
|
Loading…
Add table
Reference in a new issue