Skip to content

Commit

Permalink
Ignore ok followed by a number when deciding what to show to user
Browse files Browse the repository at this point in the history
  • Loading branch information
kliment committed Mar 21, 2018
1 parent 640a228 commit 45417e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion printrun/pronsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def __init__(self):
self.cache_dir = os.path.join(user_cache_dir("Printrun"))
self.config_dir = os.path.join(user_config_dir("Printrun"))
self.data_dir = os.path.join(user_data_dir("Printrun"))
self.lineignorepattern=re.compile("ok ?\d*$")

# --------------------------------------------------------------
# General console handling
Expand Down Expand Up @@ -1320,7 +1321,7 @@ def recvcb(self, l):
report_type = self.recvcb_report(l)
if report_type & REPORT_TEMP:
self.status.update_tempreading(l)
if l[:2] != "ok" and l[:4] != "wait" and not self.sdlisting \
if not self.lineignorepattern.match(l) and l[:4] != "wait" and not self.sdlisting \
and not self.monitoring and (report_type == REPORT_NONE or report_type & REPORT_MANUAL):
if l[:5] == "echo:":
l = l[5:].lstrip()
Expand Down

0 comments on commit 45417e3

Please sign in to comment.