comparison mercurial/patch.py @ 35202:a1d2fc32bb99

py3: define __next__ in patch.py This needed to appease Python 3's iterator protocol. This is crasher #5 in Python 3. Differential Revision: https://phab.mercurial-scm.org/D1480
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 20 Nov 2017 23:13:09 -0800
parents 1706eae096e2
children 6ba79cf34f5e
comparison
equal deleted inserted replaced
35201:bd8875b6473c 35202:a1d2fc32bb99
146 def next(self): 146 def next(self):
147 l = self.fp.readline() 147 l = self.fp.readline()
148 if not l: 148 if not l:
149 raise StopIteration 149 raise StopIteration
150 return l 150 return l
151
152 __next__ = next
151 153
152 inheader = False 154 inheader = False
153 cur = [] 155 cur = []
154 156
155 mimeheaders = ['content-type'] 157 mimeheaders = ['content-type']