Fix some more escaped quotes

This commit is contained in:
Florian Bruhin 2014-05-13 22:18:59 +02:00
parent f448aeebda
commit 876dcad28f
6 changed files with 8 additions and 9 deletions

View File

@ -43,7 +43,7 @@ class ValidationError(ValueError):
option = None option = None
def __init__(self, value, msg): def __init__(self, value, msg):
super().__init__("Invalid value \"{}\" - {}".format(value, msg)) super().__init__("Invalid value '{}' - {}".format(value, msg))
class ValidValues: class ValidValues:

View File

@ -342,7 +342,7 @@ class BaseKeyParser(QObject):
self.bindings[key] = cmd self.bindings[key] = cmd
else: else:
logging.warning( logging.warning(
"Ignoring keychain '{}' in section '{}\" because " "Ignoring keychain '{}' in section '{}' because "
"keychains are not supported there.".format(key, sectname)) "keychains are not supported there.".format(key, sectname))
def execute(self, cmdstr, keytype, count=None): def execute(self, cmdstr, keytype, count=None):

View File

@ -100,10 +100,9 @@ class HintKeyParser(CommandKeyParser):
""" """
logging.debug("Got special key {} text {}".format(e.key(), e.text())) logging.debug("Got special key {} text {}".format(e.key(), e.text()))
if e.key() == Qt.Key_Backspace: if e.key() == Qt.Key_Backspace:
logging.debug("Got backspace, mode {}, filtertext \"{}\", " logging.debug("Got backspace, mode {}, filtertext '{}', keystring "
"keystring \"{}\"".format( "'{}'".format(LastPress[self._last_press],
LastPress[self._last_press], self._filtertext, self._filtertext, self._keystring))
self._keystring))
if self._last_press == LastPress.filtertext and self._filtertext: if self._last_press == LastPress.filtertext and self._filtertext:
self._filtertext = self._filtertext[:-1] self._filtertext = self._filtertext[:-1]
self.filter_hints.emit(self._filtertext) self.filter_hints.emit(self._filtertext)

View File

@ -70,7 +70,7 @@ class History:
Args: Args:
text: The preset text. text: The preset text.
""" """
logging.debug("Preset text: \"{}\"".format(text)) logging.debug("Preset text: '{}'".format(text))
if text: if text:
items = [e for e in self._history if e.startswith(text)] items = [e for e in self._history if e.startswith(text)]
else: else:

View File

@ -120,7 +120,7 @@ class CommandCompletionModel(BaseCompletionModel):
if not obj.hide: if not obj.hide:
cmdlist.append((obj.name, obj.desc)) cmdlist.append((obj.name, obj.desc))
for name, cmd in config.section('aliases').items(): for name, cmd in config.section('aliases').items():
cmdlist.append((name, "Alias for \"{}\"".format(cmd))) cmdlist.append((name, "Alias for '{}'".format(cmd)))
cat = self.new_category("Commands") cat = self.new_category("Commands")
for (name, desc) in sorted(cmdlist): for (name, desc) in sorted(cmdlist):
self.new_item(cat, name, desc) self.new_item(cat, name, desc)

View File

@ -146,7 +146,7 @@ class WebView(QWebView):
# Let's hope flash/java stuff has an application/* mimetype OR # Let's hope flash/java stuff has an application/* mimetype OR
# at least a classid attribute. Oh, and let's home images/... # at least a classid attribute. Oh, and let's home images/...
# DON"T have a classid attribute. HTML sucks. # DON"T have a classid attribute. HTML sucks.
logging.debug("<object type=\"{}\"> clicked.".format(objtype)) logging.debug("<object type='{}'> clicked.".format(objtype))
return True return True
return False return False