diff --git a/src/chat.py b/src/chat.py index 7c57f8eb9..ce61ba07c 100644 --- a/src/chat.py +++ b/src/chat.py @@ -1346,7 +1346,7 @@ class Chat: #we don't want size of the buffer to grow indefinately max_size = gajim.config.get('key_up_lines') if size >= max_size: - for i in range(0, size - 1): + for i in xrange(0, size - 1): self.sent_history[jid][i] = self.sent_history[jid][i+1] self.sent_history[jid][max_size - 1] = message else: diff --git a/src/config.py b/src/config.py index 4801da96d..4a2c17336 100644 --- a/src/config.py +++ b/src/config.py @@ -136,7 +136,7 @@ class PreferencesWindow: l.append(dir) if l.count == 0: l.append(' ') - for i in range(len(l)): + for i in xrange(len(l)): preview = gtk.Image() files = [] files.append(os.path.join(gajim.DATA_DIR, 'iconsets', l[i], '16x16', 'online.png')) @@ -1097,7 +1097,7 @@ class AccountModificationWindow: self.proxy_combobox.set_model(model) l = gajim.config.get_per('proxies') l.insert(0, 'None') - for i in range(len(l)): + for i in xrange(len(l)): model.append([l[i]]) if our_proxy == l[i]: self.proxy_combobox.set_active(i) diff --git a/src/gajim-remote.py b/src/gajim-remote.py index b71c61af9..21b9a6cb6 100755 --- a/src/gajim-remote.py +++ b/src/gajim-remote.py @@ -388,7 +388,7 @@ Please specify account for sending the message.') % sys.argv[2]) is_float = True else: is_float = False - for i in range(len(value) - 1): + for i in xrange(len(value) - 1): chr = value[i+1] if chr == '.': is_float = True @@ -410,7 +410,7 @@ Please specify account for sending the message.') % sys.argv[2]) _str = '' previous_slash = False slashes = 0 - for i in range(len(value) - 1): + for i in xrange(len(value) - 1): chr = value[i+1] if previous_slash: previous_slash = False diff --git a/src/roster_window.py b/src/roster_window.py index 4b83590c0..ed4e82ed2 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -781,7 +781,7 @@ class RosterWindow: 'attached_gpg_keys').split() keys = {} keyID = 'None' - for i in range(0, len(attached_keys)/2): + for i in xrange(0, len(attached_keys)/2): keys[attached_keys[2*i]] = attached_keys[2*i+1] if attached_keys[2*i] == user.jid: keyID = attached_keys[2*i+1] diff --git a/src/systraywin32.py b/src/systraywin32.py index 460011b36..86311eb78 100644 --- a/src/systraywin32.py +++ b/src/systraywin32.py @@ -98,7 +98,7 @@ class SystrayWINAPI: cblist = self._message_map[key] if isinstance(cblist, list): if not len(cblist) < 2: - for i in range(len(cblist)): + for i in xrange(len(cblist)): if cblist[i] == callback: del self._message_map[key][i] return