summaryrefslogtreecommitdiff
path: root/poezio/core
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-28 14:49:54 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-28 14:49:54 +0200
commit7b3a116d7602a25dd71b16133be44a35cb3d7cf1 (patch)
treeca0a1db4b241d73442f044778f128f129f8f4416 /poezio/core
parente846825fc812cdf48717dd1c156d430101e2f5d0 (diff)
downloadpoezio-7b3a116d7602a25dd71b16133be44a35cb3d7cf1.tar.gz
poezio-7b3a116d7602a25dd71b16133be44a35cb3d7cf1.tar.bz2
poezio-7b3a116d7602a25dd71b16133be44a35cb3d7cf1.tar.xz
poezio-7b3a116d7602a25dd71b16133be44a35cb3d7cf1.zip
Replace the '%s' % var pattern with str(var).
Diffstat (limited to 'poezio/core')
-rw-r--r--poezio/core/commands.py2
-rw-r--r--poezio/core/core.py10
-rw-r--r--poezio/core/handlers.py10
3 files changed, 11 insertions, 11 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 8c7cbcd2..7d503fff 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -895,7 +895,7 @@ class CommandCore:
def iqfunc(iq):
"handler for an iq reply"
- self.core.information('%s' % iq, 'Iq')
+ self.core.information(str(iq), 'Iq')
self.core.xmpp.remove_handler('Iq %s' % iq_id)
self.core.xmpp.register_handler(
diff --git a/poezio/core/core.py b/poezio/core/core.py
index 7c6ad886..b708e2cf 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -810,7 +810,7 @@ class Core(object):
'Could not execute command (%s)',
repr(command),
exc_info=True)
- self.information('%s' % exc, 'Error')
+ self.information(str(exc), 'Error')
def do_command(self, key, raw):
"""
@@ -1179,7 +1179,7 @@ class Core(object):
def go_to_previous_tab(self):
"Go to the previous tab"
- self.command.win('%s' % (self.previous_tab_nb, ))
+ self.command.win(str(self.previous_tab_nb))
def go_to_important_room(self):
"""
@@ -1207,7 +1207,7 @@ class Core(object):
if (tab.nb < self.current_tab_nb
and tab_refs[state][-1].nb > self.current_tab_nb):
continue
- self.command.win('%s' % tab.nb)
+ self.command.win(str(tab.nb))
return
return
@@ -1216,7 +1216,7 @@ class Core(object):
for tab in self.tabs:
if tab.name == tab_name:
if (type_ and (isinstance(tab, type_))) or not type_:
- self.command.win('%s' % (tab.nb, ))
+ self.command.win(str(tab.nb))
return True
return False
@@ -1267,7 +1267,7 @@ class Core(object):
# if the room exists, focus it and return
for tab in self.get_tabs(tabs.PrivateTab):
if tab.name == complete_jid:
- self.command.win('%s' % tab.nb)
+ self.command.win(str(tab.nb))
return tab
# create the new tab
tab = self.get_tab_by_name(room_name, tabs.MucTab)
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 268c9733..d34534d0 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -1404,7 +1404,7 @@ class HandlerCore:
"""
When a data form is received
"""
- self.core.information('%s' % message)
+ self.core.information(str(message))
def on_attention(self, message):
"""
@@ -1430,11 +1430,11 @@ class HandlerCore:
"""
if self.core.xml_tab:
if PYGMENTS:
- xhtml_text = highlight('%s' % stanza, LEXER, FORMATTER)
+ xhtml_text = highlight(str(stanza), LEXER, FORMATTER)
poezio_colored = xhtml.xhtml_to_poezio_colors(
xhtml_text, force=True).rstrip('\x19o').strip()
else:
- poezio_colored = '%s' % stanza
+ poezio_colored = str(stanza)
self.core.add_message_to_text_buffer(
self.core.xml_buffer,
poezio_colored,
@@ -1459,11 +1459,11 @@ class HandlerCore:
"""
if self.core.xml_tab:
if PYGMENTS:
- xhtml_text = highlight('%s' % stanza, LEXER, FORMATTER)
+ xhtml_text = highlight(str(stanza), LEXER, FORMATTER)
poezio_colored = xhtml.xhtml_to_poezio_colors(
xhtml_text, force=True).rstrip('\x19o').strip()
else:
- poezio_colored = '%s' % stanza
+ poezio_colored = str(stanza)
self.core.add_message_to_text_buffer(
self.core.xml_buffer,
poezio_colored,