Skip to content

Commit

Permalink
Update network.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shawaj authored Oct 20, 2024
1 parent a892dd2 commit 7466ec4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw_diag/utilities/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 7466ec4

Please sign in to comment.