mirror of
https://github.com/ShaYmez/HBmonitor.git
synced 2024-10-31 14:27:15 -04:00
check UTF-8 for COLORCODE
This commit is contained in:
parent
12d453874b
commit
040a5cd991
@ -266,7 +266,11 @@ def add_hb_peer(_peer_conf, _ctable_loc, _peer):
|
||||
else:
|
||||
_ctable_peer['CALLSIGN'] = _peer_conf['CALLSIGN']
|
||||
|
||||
_ctable_peer['COLORCODE'] = _peer_conf['COLORCODE'].decode('utf-8')
|
||||
if str(type(_peer_conf['COLORCODE'])).find("bytes") != -1:
|
||||
_ctable_peer['COLORCODE'] = _peer_conf['COLORCODE'].decode('utf-8').strip()
|
||||
else:
|
||||
_ctable_peer['COLORCODE'] = _peer_conf['COLORCODE']
|
||||
|
||||
_ctable_peer['CONNECTION'] = _peer_conf['CONNECTION']
|
||||
_ctable_peer['CONNECTED'] = since(_peer_conf['CONNECTED'])
|
||||
_ctable_peer['IP'] = _peer_conf['IP']
|
||||
|
Loading…
Reference in New Issue
Block a user