mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-07 05:30:44 +00:00
utils/serial_port: fix exception message
SerialError does not populate it's message attribute, so the message was lost when re-raising as HostError. Pass the string representation of SerialError into HostError instead.
This commit is contained in:
parent
f490a55be2
commit
c706e693ba
@ -55,7 +55,7 @@ def get_connection(timeout, init_dtr=None, logcls=SerialLogger,
|
||||
try:
|
||||
conn = serial.Serial(*args, **kwargs)
|
||||
except serial.SerialException as e:
|
||||
raise HostError(e.message)
|
||||
raise HostError(str(e))
|
||||
if init_dtr is not None:
|
||||
conn.setDTR(init_dtr)
|
||||
conn.nonblocking()
|
||||
|
Loading…
x
Reference in New Issue
Block a user