mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-24 22:44:04 +08:00
Rename function for more clarity
This commit is contained in:
parent
91d169eb53
commit
d55b1adabb
2 changed files with 3 additions and 3 deletions
|
@ -189,7 +189,7 @@ def has_random_variables(config_dict: dict) -> Tuple[bool, dict]:
|
||||||
return is_modified, config_dict
|
return is_modified, config_dict
|
||||||
|
|
||||||
|
|
||||||
def handle_variables(config_dict: dict, value: str) -> str:
|
def evaluate_variables(config_dict: dict, value: str) -> str:
|
||||||
"""
|
"""
|
||||||
Replaces various variables with their actual value in a string
|
Replaces various variables with their actual value in a string
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -41,13 +41,13 @@ def run_upgrade(config_dict):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
host_identity = configuration.handle_variables(
|
host_identity = configuration.evaluate_variables(
|
||||||
config_dict, config_dict["options"]["auto_upgrade_host_identity"]
|
config_dict, config_dict["options"]["auto_upgrade_host_identity"]
|
||||||
)
|
)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
host_identity = None
|
host_identity = None
|
||||||
try:
|
try:
|
||||||
group = configuration.handle_variables(
|
group = configuration.evaluate_variables(
|
||||||
config_dict, config_dict["options"]["auto_ugrade_group"]
|
config_dict, config_dict["options"]["auto_ugrade_group"]
|
||||||
)
|
)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in a new issue