diff mercurial/keepalive.py @ 7622:4dd7b28003d2

use dict.iteritems() rather than dict.items() This should be faster and more future-proof. Calls where the result is to be sorted using util.sort() have been left unchanged. Calls to .items() on configparser objects have been left as-is, too.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 12 Jan 2009 09:16:03 +0100
parents ac0bcd951c2c
children a45206455d85
line wrap: on
line diff
--- a/mercurial/keepalive.py	Mon Jan 12 09:07:02 2009 +0100
+++ b/mercurial/keepalive.py	Mon Jan 12 09:16:03 2009 +0100
@@ -197,7 +197,7 @@
 
     def close_all(self):
         """close all open connections"""
-        for host, conns in self._cm.get_all().items():
+        for host, conns in self._cm.get_all().iteritems():
             for h in conns:
                 self._cm.remove(h)
                 h.close()