mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-24 20:37:06 +08:00
Add audience identifier in version string
This commit is contained in:
parent
f7b3884ab5
commit
e60709f1a7
2 changed files with 8 additions and 2 deletions
|
|
@ -243,9 +243,10 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
|
||||
args = parser.parse_args()
|
||||
|
||||
version_string = "{} v{} {} - {}".format(
|
||||
version_string = "{} v{}-{} {} - {}".format(
|
||||
__intname__,
|
||||
__version__,
|
||||
"PRIV" if configuration.IS_PRIV_BUILD else "PUB",
|
||||
__build__,
|
||||
"GUI disabled" if _NO_GUI else "GUI enabled",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -25,11 +25,12 @@ from npbackup.customization import ID_STRING
|
|||
try:
|
||||
from npbackup._private_secret_keys import AES_KEY, DEFAULT_BACKUP_ADMIN_PASSWORD
|
||||
from npbackup._private_revac import revac
|
||||
|
||||
AES_KEY = revac(AES_KEY)
|
||||
IS_PRIV_BUILD = True
|
||||
except ImportError:
|
||||
try:
|
||||
from npbackup.secret_keys import AES_KEY, DEFAULT_BACKUP_ADMIN_PASSWORD
|
||||
IS_PRIV_BUILD = False
|
||||
except ImportError:
|
||||
print("No secret_keys file. Please read documentation.")
|
||||
sys.exit(1)
|
||||
|
|
@ -270,3 +271,7 @@ def save_config(config_file: str, config_dict: dict) -> bool:
|
|||
except OSError:
|
||||
logger.critical("Cannot save configuartion file to %s", config_file)
|
||||
return False
|
||||
|
||||
|
||||
def is_priv_build() -> bool:
|
||||
return IS_PRIV_BUILD
|
||||
Loading…
Add table
Reference in a new issue