mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-24 09:20:06 -04:00
BE: DEEP_SLEEP #1555 co-author @legionGer
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -262,8 +262,14 @@ def update_GUI_port():
|
||||
Grabs the PORT for the webinterface and converts it to HEX to use for activity checks
|
||||
"""
|
||||
global hex_gui_port
|
||||
gui_port_string = port = os.environ.get('PORT', defaultWebPort)
|
||||
hex_gui_port = ':'+format(int(gui_port_string), '04X')
|
||||
|
||||
gui_port_string = os.environ.get('PORT', str(defaultWebPort))
|
||||
try:
|
||||
port = int(gui_port_string)
|
||||
except (TypeError, ValueError):
|
||||
mylog("none", [f"[API] Invalid PORT value '{gui_port_string}', falling back to {defaultWebPort}"])
|
||||
port = defaultWebPort
|
||||
hex_gui_port = ':' + format(port, '04X')
|
||||
|
||||
|
||||
def check_activity():
|
||||
|
||||
Reference in New Issue
Block a user