From 773ee7bb73814319ee9b8fdf8bc43af716b85961 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 24 Dec 2011 12:38:55 +0100 Subject: [PATCH] Replace iteritems() by items() --- src/qweechat/qweechat.py | 2 +- src/qweechat/weechat/protocol.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qweechat/qweechat.py b/src/qweechat/qweechat.py index 78d9b29..bf3c146 100755 --- a/src/qweechat/qweechat.py +++ b/src/qweechat/qweechat.py @@ -98,7 +98,7 @@ class MainWindow(QtGui.QMainWindow): 'quit' : ['application-exit.png', 'Quit application', 'Ctrl+Q', self.close], } self.actions = {} - for name, action in actions_def.iteritems(): + for name, action in list(actions_def.items()): self.actions[name] = QtGui.QAction(QtGui.QIcon('data/icons/%s' % action[0]), name.capitalize(), self) self.actions[name].setStatusTip(action[1]) self.actions[name].setShortcut(action[2]) diff --git a/src/qweechat/weechat/protocol.py b/src/qweechat/weechat/protocol.py index 9f92cfc..bf26ae4 100644 --- a/src/qweechat/weechat/protocol.py +++ b/src/qweechat/weechat/protocol.py @@ -49,14 +49,14 @@ class WeechatObject: ' path: %s' % str(self.value['path'])] for i, item in enumerate(self.value['items']): lines.append(' item %d:' % (i + 1)) - lines.append('\n'.join([' %s: %s' % (key, self._str_value(value)) for key, value in iter(sorted(item.iteritems()))])) + lines.append('\n'.join([' %s: %s' % (key, self._str_value(value)) for key, value in sorted(item.items())])) return '\n'.join(lines) def _str_value_infolist(self): lines = ['', ' name: %s' % self.value['name']] for i, item in enumerate(self.value['items']): lines.append(' item %d:' % (i + 1)) - lines.append('\n'.join([' %s: %s' % (key, self._str_value(value)) for key, value in iter(sorted(item.iteritems()))])) + lines.append('\n'.join([' %s: %s' % (key, self._str_value(value)) for key, value in sorted(item.items())])) return '\n'.join(lines) def _str_value_other(self):