From 7466ec4da8b99cbaec603980e48b1d915de892b0 Mon Sep 17 00:00:00 2001 From: Aaron Shaw Date: Sun, 20 Oct 2024 13:45:43 +0100 Subject: [PATCH] Update network.py --- hw_diag/utilities/network.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw_diag/utilities/network.py b/hw_diag/utilities/network.py index efec6f5d..fc215b93 100644 --- a/hw_diag/utilities/network.py +++ b/hw_diag/utilities/network.py @@ -55,7 +55,7 @@ def setup_hostname(): # This runs before the Flask app is really fully running, so we do not have the # global "g" object with the db session, so we must spawn our own. db = get_db_session() - INITIAL_HOSTNAME_OVERRIDE = os.getenv('INITIAL_HOSTNAME_OVERRIDE', 'false') + HOSTNAME_OVERRIDE = os.getenv('HOSTNAME_OVERRIDE', 'false') HOSTNAME_SET_KEY = "hostname_set" try: try: @@ -77,8 +77,8 @@ def setup_hostname(): default_password = generate_default_password() hostname_suffix = default_password[6:] - if INITIAL_HOSTNAME_OVERRIDE != "false": - hostname = INITIAL_HOSTNAME_OVERRIDE + if HOSTNAME_OVERRIDE != "false": + hostname = HOSTNAME_OVERRIDE logging.info("Using hostname override from env var!") else: hostname = "nebra-%s.local" % hostname_suffix