Fix invalid escape sequences.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 13bfea6aff)
r14.1.x
Slávek Banko 10 months ago
parent 10f0a51a17
commit 1825d1c2f6
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -2617,7 +2617,7 @@ class MountEntryDialog(KDialogBase):
and not os.path.isfile(self.currentMountEntry.getMountPoint())
and not self.currentMountEntry.mounttype == 'swap'):
ask = KMessageBox.warningYesNoCancel(self,
i18n("""The mountpoint '%1' does not exist. You will not be able to enable it until it is created.\
i18n("""The mountpoint '%1' does not exist. You will not be able to enable it until it is created.\
\nShould I create the mountpoint?""").arg(self.currentMountEntry.getMountPoint()),
i18n("Mountpoint does not exist"))
if ask==KMessageBox.Cancel:
@ -2626,7 +2626,7 @@ class MountEntryDialog(KDialogBase):
os.mkdir(self.currentMountEntry.getMountPoint())
elif os.path.isfile(self.currentMountEntry.getMountPoint()):
if KMessageBox.warningContinueCancel(self,
i18n("""The mountpoint '%1' is a file, but it has to be a directory. You will probably not \
i18n("""The mountpoint '%1' is a file, but it has to be a directory. You will probably not \
be able to enable it.\nContinue?""").arg(self.currentMountEntry.getMountPoint()),
i18n("Invalid mountpoint"))!=KMessageBox.Continue:
return

@ -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())

Loading…
Cancel
Save