Skip to content

Commit e0eacfa

Browse files
authored
Remove newlines in detailed log messages
The (officially deprecated, but still working) JLINKARM_EnableLogCom adds newlines add the end of every message that clobber the log output. Use rstrip() to remove the newlines.
1 parent 9a06468 commit e0eacfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pylink/jlink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def __init__(self, lib=None, log=None, detailed_log=None, error=None, warn=None,
322322
self.error_handler = lambda s: (error or logger.error)(s.decode(errors='replace'))
323323
self.warning_handler = lambda s: (warn or logger.warning)(s.decode(errors='replace'))
324324
self.log_handler = lambda s: (log or logger.info)(s.decode(errors='replace'))
325-
self.detailed_log_handler = lambda s: (detailed_log or logger.debug)(s.decode(errors='replace'))
325+
self.detailed_log_handler = lambda s: (detailed_log or logger.debug)(s.decode(errors='replace').rstrip())
326326

327327
# Parameters used for open() in context manager
328328
self.__serial_no = serial_no

0 commit comments

Comments
 (0)