Browse Source

Revert "fallback when decoding errors happen"

This reverts commit f189006dd4.
pull/389/head
Chris 5 years ago
parent
commit
e598573c65
1 changed files with 2 additions and 3 deletions
  1. 5
      gooey/gui/processor.py

5
gooey/gui/processor.py

@ -66,8 +66,7 @@ class ProcessController(object):
line = process.stdout.readline() line = process.stdout.readline()
if not line: if not line:
break break
pub.send_message(events.CONSOLE_UPDATE, msg=line.decode(self.encoding, 'replace'))
pub.send_message(events.CONSOLE_UPDATE, msg=line.decode(self.encoding))
pub.send_message(events.PROGRESS_UPDATE, pub.send_message(events.PROGRESS_UPDATE,
progress=self._extract_progress(line)) progress=self._extract_progress(line))
pub.send_message(events.EXECUTION_COMPLETE) pub.send_message(events.EXECUTION_COMPLETE)
@ -78,7 +77,7 @@ class ProcessController(object):
user-supplied regex and calculation instructions user-supplied regex and calculation instructions
''' '''
# monad-ish dispatch to avoid the if/else soup # monad-ish dispatch to avoid the if/else soup
find = partial(re.search, string=text.strip().decode(self.encoding, 'replace'))
find = partial(re.search, string=text.strip().decode(self.encoding))
regex = unit(self.progress_regex) regex = unit(self.progress_regex)
match = bind(regex, find) match = bind(regex, find)
result = bind(match, self._calculate_progress) result = bind(match, self._calculate_progress)

Loading…
Cancel
Save