Improve MAC formatting

Add ":" separator between each byte in hexadecimal and transform chars
to uppercase.
multi-ogserver
Javier Sánchez Parra 2022-05-17 12:14:59 +02:00
parent d9fe4dfa41
commit b74820a84c
1 changed files with 2 additions and 1 deletions

View File

@ -296,7 +296,8 @@ def get_client_mac():
resp = g.server.get('/client/info', payload)
client_info = resp.json()
mac = client_info.get('mac')
return jsonify(mac)
pretty_mac = (':'.join(mac[i:i+2] for i in range(0, 12, 2))).upper()
return jsonify(pretty_mac)
@app.route('/scopes/')