mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:12:48 +01:00
autotests: fix issue with hlrauc reading sim database
hlrauc.py was not stripping out newlines when reading the sim database files. Also added a print if an exception occurred.
This commit is contained in:
parent
263074511d
commit
e9e96604c5
@ -31,7 +31,10 @@ class AuthCenter:
|
||||
data, addr = self._socket.recvfrom(1000)
|
||||
data = data.decode('ascii')
|
||||
resp = self._process_data(data)
|
||||
except BlockingIOError:
|
||||
continue
|
||||
except:
|
||||
print("Exception:", sys.exc_info()[0])
|
||||
continue
|
||||
if resp:
|
||||
self._socket.sendto(bytearray(resp, 'UTF-8'), addr)
|
||||
@ -43,7 +46,7 @@ class AuthCenter:
|
||||
if line[0] == '#':
|
||||
continue
|
||||
else:
|
||||
data = line.split(':')
|
||||
data = line.strip('\n').split(':')
|
||||
self._database[data[0]] = data[1:]
|
||||
|
||||
def _process_data(self, data):
|
||||
|
Loading…
Reference in New Issue
Block a user