Patchwork [V2] py3: use iter() instead of iterkeys()

login
register
mail settings
Submitter Rishabh Madan
Date March 15, 2017, 11:28 p.m.
Message ID <aab99adf3fd2f100f134.1489620497@bunty>
Download mbox | patch
Permalink /patch/19370/
State Accepted
Headers show

Comments

Rishabh Madan - March 15, 2017, 11:28 p.m.
# HG changeset patch
# User Rishabh Madan <rishabhmadan96@gmail.com>
# Date 1489620203 -19800
#      Thu Mar 16 04:53:23 2017 +0530
# Node ID aab99adf3fd2f100f134ef7378faf4367550a4eb
# Parent  1c48a8278b2f015fca607dfc652823560a5ac580
py3: use iter() instead of iterkeys()

Patch

diff -r 1c48a8278b2f -r aab99adf3fd2 mercurial/util.py
--- a/mercurial/util.py	Sun Mar 12 17:16:43 2017 -0700
+++ b/mercurial/util.py	Thu Mar 16 04:53:23 2017 +0530
@@ -2918,7 +2918,7 @@ 
             del dirs[base]
 
     def __iter__(self):
-        return self._dirs.iterkeys()
+        return iter(self._dirs)
 
     def __contains__(self, d):
         return d in self._dirs