diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2024-01-28 21:11:46 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2024-01-28 21:11:46 +0100 |
commit | 13bfea6aff1ffed3aa172b5e7ae5540b7e2c3a4a (patch) | |
tree | ad7052de7d890187859f27cf0a0ee8ff0531ee78 /serviceconfig | |
parent | bde8dd4103c094d23e7a96d9754d691e385f1cac (diff) | |
download | tde-guidance-13bfea6aff1ffed3aa172b5e7ae5540b7e2c3a4a.tar.gz tde-guidance-13bfea6aff1ffed3aa172b5e7ae5540b7e2c3a4a.zip |
Fix invalid escape sequences.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'serviceconfig')
-rwxr-xr-x | serviceconfig/serviceconfig.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/serviceconfig/serviceconfig.py b/serviceconfig/serviceconfig.py index 1a0c802..42bb543 100755 --- a/serviceconfig/serviceconfig.py +++ b/serviceconfig/serviceconfig.py @@ -1437,9 +1437,9 @@ class CommandRunner(KDialogBase): def slotReadyReadStdout(self): # Remove the colors used by some programs. # FIXME: this probably isn't neccessary anymore. - uncolor = lambda text: re.compile('\\x1b\[[0-9]+;01m').sub("", \ - re.compile('\\x1b\[0m').sub("", re.compile('\\033\[1;[0-9]+m').sub("", \ - re.compile('\\033\[0m').sub("", text)))) + uncolor = lambda text: re.compile('\\x1b\\[[0-9]+;01m').sub("", \ + re.compile('\\x1b\\[0m').sub("", re.compile('\\033\\[1;[0-9]+m').sub("", \ + re.compile('\\033\\[0m').sub("", text)))) self.output += uncolor(str(self.kid.readStdout())) self.outputtextview.setText(self.output) self.outputtextview.ensureVisible(0,self.outputtextview.contentsHeight()) |