frappy.io: make error reporting consistent
- fix mechanism to avoid multiple error messages in log files Change-Id: I688071f9b06da1a81eb12d63adb549042171c7c8
This commit is contained in:
parent
1776d7b4b6
commit
ca57f46ed2
@ -170,8 +170,8 @@ class IOBase(Communicator):
|
||||
self.callCallbacks()
|
||||
return self.is_connected
|
||||
except Exception as e:
|
||||
if str(e) != self._last_error:
|
||||
self._last_error = str(e)
|
||||
if repr(e) != self._last_error:
|
||||
self._last_error = repr(e)
|
||||
self.log.error(self._last_error)
|
||||
raise SilentError(repr(e)) from e
|
||||
return self.is_connected
|
||||
@ -324,7 +324,7 @@ class StringIO(IOBase):
|
||||
if self._conn is None:
|
||||
raise SilentError('disconnected') from None
|
||||
if repr(e) != self._last_error:
|
||||
self._last_error = str(e)
|
||||
self._last_error = repr(e)
|
||||
self.log.error(self._last_error)
|
||||
raise SilentError(repr(e)) from e
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user