only print server-wide arl msg if .arl file exists

This commit is contained in:
uh_wot 2020-05-05 15:48:11 +02:00
parent 1ed3a89298
commit e5652e0621

View file

@ -62,8 +62,6 @@ def closing():
return 'server closed'
serverwide_arl = "--serverwide-arl" in sys.argv
if serverwide_arl:
print("Server-wide ARL enabled.")
@socketio.on('connect')
def on_connect():
@ -75,6 +73,7 @@ def on_connect():
arl_file_path = path.join(localpaths.getConfigFolder(), '.arl')
if serverwide_arl and path.isfile(arl_file_path):
print("Server-wide ARL enabled.")
with open(arl_file_path, 'r') as file:
arl = file.read()
emit('init_serverwideARL', arl)