tests: cli: Handle UnicodeError when logging
This commit is contained in:
parent
81d68e6100
commit
e3d35b2fb9
|
@ -132,6 +132,8 @@ class VirtStreamHandler(logging.StreamHandler):
|
|||
self.flush()
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except (UnicodeError, TypeError):
|
||||
stream.write((fs % msg).encode("utf-8"))
|
||||
except Exception:
|
||||
self.handleError(record)
|
||||
|
||||
|
|
Loading…
Reference in New Issue