diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core.py | 6 | ||||
-rw-r--r-- | src/tabs.py | 18 | ||||
-rw-r--r-- | src/windows.py | 34 |
3 files changed, 29 insertions, 29 deletions
diff --git a/src/core.py b/src/core.py index 1e6d52cf..7f578bd2 100644 --- a/src/core.py +++ b/src/core.py @@ -717,7 +717,7 @@ class Core(object): if not contact: contact = Contact(jid) roster.add_contact(contact, jid) - log.debug("CONTACT: %s" % contact) + log.debug("CONTACT: %s", contact) if contact.subscription in ('from', 'both'): log.debug('FROM OR BOTH') return @@ -1346,7 +1346,7 @@ class Core(object): try: names = os.listdir(themes_dir) except OSError as e: - log.debug(_('Completion failed: %s') % e) + log.debug(_('Completion failed: %s'), e) return theme_files = [name[:-3] for name in names if name.endswith('.py')] if not 'default' in theme_files: @@ -1687,7 +1687,7 @@ class Core(object): self.tabs.remove(tab) import gc gc.collect() - log.debug('___ Referrers of closing tab:\n%s\n______' % gc.get_referrers(tab)) + log.debug('___ Referrers of closing tab:\n%s\n______', gc.get_referrers(tab)) del tab self.refresh_window() diff --git a/src/tabs.py b/src/tabs.py index cb3ef520..23d30a8c 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -152,10 +152,10 @@ class Tab(object): @state.setter def state(self, value): if not value in STATE_COLORS: - log.debug("Invalid value for tab state: %s" % value) + log.debug("Invalid value for tab state: %s", value) elif STATE_PRIORITY[value] < STATE_PRIORITY[self._state] and \ value != 'current': - log.debug("Did not set status because of lower priority, asked: %s, kept: %s" % (value, self.state)) + log.debug("Did not set status because of lower priority, asked: %s, kept: %s", (value, self.state)) else: self._state = value @@ -320,7 +320,7 @@ class Tab(object): self.input.on_delete() def __del__(self): - log.debug('------ Closing tab %s' % self.__class__.__name__) + log.debug('------ Closing tab %s', self.__class__.__name__) class ChatTab(Tab): """ @@ -927,7 +927,7 @@ class MucTab(ChatTab): def refresh(self): if self.need_resize: self.resize() - log.debug(' TAB Refresh: %s'%self.__class__.__name__) + log.debug(' TAB Refresh: %s',self.__class__.__name__) self.topic_win.refresh(self.get_single_line_topic()) self.text_win.refresh() self.v_separator.refresh() @@ -1414,7 +1414,7 @@ class PrivateTab(ChatTab): def refresh(self): if self.need_resize: self.resize() - log.debug(' TAB Refresh: %s'%self.__class__.__name__) + log.debug(' TAB Refresh: %s',self.__class__.__name__) self.text_win.refresh() self.info_header.refresh(self.name, self.text_win, self.chatstate) self.info_win.refresh() @@ -1889,7 +1889,7 @@ class RosterInfoTab(Tab): def refresh(self): if self.need_resize: self.resize() - log.debug(' TAB Refresh: %s'%self.__class__.__name__) + log.debug(' TAB Refresh: %s',self.__class__.__name__) self.v_separator.refresh() self.roster_win.refresh(roster) self.contact_info_win.refresh(self.roster_win.get_selected_row()) @@ -2154,7 +2154,7 @@ class ConversationTab(ChatTab): def refresh(self): if self.need_resize: self.resize() - log.debug(' TAB Refresh: %s'%self.__class__.__name__) + log.debug(' TAB Refresh: %s',self.__class__.__name__) self.text_win.refresh() self.upper_bar.refresh(self.get_name(), roster.get_contact_by_jid(self.get_name())) self.info_header.refresh(self.get_name(), roster.get_contact_by_jid(self.get_name()), self.text_win, self.chatstate, ConversationTab.additional_informations) @@ -2269,7 +2269,7 @@ class MucListTab(Tab): def refresh(self): if self.need_resize: self.resize() - log.debug(' TAB Refresh: %s'%self.__class__.__name__) + log.debug(' TAB Refresh: %s',self.__class__.__name__) self.upper_message.refresh() self.list_header.refresh() self.listview.refresh() @@ -2419,7 +2419,7 @@ class SimpleTextTab(Tab): def refresh(self): if self.need_resize: self.resize() - log.debug(' TAB Refresh: %s'%self.__class__.__name__) + log.debug(' TAB Refresh: %s',self.__class__.__name__) self.text_win.refresh() self.refresh_tab_win() self.input.refresh() diff --git a/src/windows.py b/src/windows.py index b0c9f314..81153239 100644 --- a/src/windows.py +++ b/src/windows.py @@ -216,7 +216,7 @@ class UserList(Win): self.addstr(y, self.width-2, '++', to_curses_attr(get_theme().COLOR_MORE_INDICATOR)) def refresh(self, users): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() y = 0 @@ -265,7 +265,7 @@ class Topic(Win): self._message = '' def refresh(self, topic=None): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() if topic: @@ -288,7 +288,7 @@ class GlobalInfoBar(Win): Win.__init__(self) def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) def compare_room(a): return a.nb comp = lambda x: x.nb @@ -380,7 +380,7 @@ class PrivateInfoWin(InfoWin): InfoWin.__init__(self) def refresh(self, name, window, chatstate): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() self.write_room_name(name) @@ -422,7 +422,7 @@ class ConversationInfoWin(InfoWin): # contact can be None, if we receive a message # from someone not in our roster. In this case, we display # only the maximum information from the message we can get. - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) jid = JID(jid) if contact: if jid.resource: @@ -497,7 +497,7 @@ class ConversationStatusMessageWin(InfoWin): InfoWin.__init__(self) def refresh(self, jid, contact): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) jid = JID(jid) if contact: if jid.resource: @@ -525,7 +525,7 @@ class MucInfoWin(InfoWin): InfoWin.__init__(self) def refresh(self, room, window=None): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() self.write_room_name(room) @@ -653,7 +653,7 @@ class TextWin(Win): return len(lines) def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) if self.height <= 0: return if self.pos == 0: @@ -733,7 +733,7 @@ class TextWin(Win): self.built_lines.pop(0) def __del__(self): - log.debug('** TextWin: deleting %s built lines' % (len(self.built_lines))) + log.debug('** TextWin: deleting %s built lines', (len(self.built_lines))) del self.built_lines class HelpText(Win): @@ -747,7 +747,7 @@ class HelpText(Win): self.txt = text def refresh(self, txt=None): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) if txt: self.txt = txt with g_lock: @@ -1144,7 +1144,7 @@ class Input(Win): self._refresh() def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) self.rewrite_text() def clear_text(self): @@ -1377,7 +1377,7 @@ class VerticalSeparator(Win): self._refresh() def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) self.rewrite_line() class RosterWin(Win): @@ -1432,7 +1432,7 @@ class RosterWin(Win): """ We get the roster object """ - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self.roster_len = len(roster) while self.roster_len and self.pos >= self.roster_len: @@ -1597,7 +1597,7 @@ class ContactInfoWin(Win): self.finish_line(get_theme().COLOR_INFORMATION_BAR) def refresh(self, selected_row): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() if isinstance(selected_row, RosterGroup): @@ -1661,7 +1661,7 @@ class ListWin(Win): return None def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s', self.__class__.__name__) with g_lock: self._win.erase() lines = self.lines[self._starting_pos:self._starting_pos+self.height] @@ -1747,7 +1747,7 @@ class ColumnHeaderWin(Win): return self._columns def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() x = 0 @@ -1783,7 +1783,7 @@ class SimpleTextWin(Win): self.built_lines.append(line) def refresh(self): - log.debug('Refresh: %s'%self.__class__.__name__) + log.debug('Refresh: %s',self.__class__.__name__) with g_lock: self._win.erase() for y, line in enumerate(self.built_lines): |