diff mercurial/peer.py @ 29216:ead25aa27a43

py3: convert to next() function next(..) was introduced in py2.6 and .next() is not available in py3 https://docs.python.org/2/library/functions.html#next
author timeless <timeless@mozdev.org>
date Mon, 16 May 2016 21:30:53 +0000
parents 8d38eab2777a
children e2fc2122029c
line wrap: on
line diff
--- a/mercurial/peer.py	Mon May 16 21:30:32 2016 +0000
+++ b/mercurial/peer.py	Mon May 16 21:30:53 2016 +0000
@@ -98,12 +98,12 @@
     '''
     def plain(*args, **opts):
         batchable = f(*args, **opts)
-        encargsorres, encresref = batchable.next()
+        encargsorres, encresref = next(batchable)
         if not encresref:
             return encargsorres # a local result in this case
         self = args[0]
         encresref.set(self._submitone(f.func_name, encargsorres))
-        return batchable.next()
+        return next(batchable)
     setattr(plain, 'batchable', f)
     return plain