forked from Mirror/pmbootstrap
logging: reset style at the end of log line (MR 2272)
Fix a regression from my recent patch that made text like the following
green:
*** text ****
We also have log messages that only start with ***, but do not end with
***, coming from "pmbootstrap aportgen". They indicate that a new aport
has been generated, but are not a headline for the coming commands.
Fix that the aportgen messages don't reset the colors at the end of the
line, and so the next line would start with the color.
Fixes: 6ba138b6
("logging: print text between *** in green (MR 2263)")
This commit is contained in:
parent
1020bd61ad
commit
96da7f161a
1 changed files with 2 additions and 5 deletions
|
@ -52,13 +52,10 @@ class log_handler(logging.StreamHandler):
|
|||
f"{styles['GREEN']}*** ",
|
||||
1,
|
||||
)
|
||||
.replace(
|
||||
" ***",
|
||||
f" ***{styles['END']}",
|
||||
1,
|
||||
)
|
||||
)
|
||||
|
||||
msg_col += styles["END"]
|
||||
|
||||
stream.write(msg_col)
|
||||
stream.write(self.terminator)
|
||||
self.flush()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue