Skip to content

Commit

Permalink
Fixes #3308 strips out any ANSI escape sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed Apr 25, 2018
1 parent 201f8b1 commit 3a00d1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion journalist_gui/journalist_gui/SecureDropUpdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
from PyQt5.QtCore import QThread, pyqtSignal
import subprocess
import os
import re
import pexpect

from journalist_gui import updaterUI, strings, resources_rc # noqa


LOCK_LOCATION = "/home/amnesia/Persistent/securedrop/securedrop_update.lock" # noqa
ESCAPE_POD = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')


class SetupThread(QThread):
Expand Down Expand Up @@ -120,7 +122,7 @@ def run(self):
self.update_success = False
self.failure_reason = strings.tailsconfig_failed_generic_reason
result = {'status': self.update_success,
'output': self.output,
'output': ESCAPE_POD.sub('', self.output),
'failure_reason': self.failure_reason}
self.signal.emit(result)

Expand Down

0 comments on commit 3a00d1f

Please sign in to comment.