# HG changeset patch # User Augie Fackler # Date 1505756165 14400 # Node ID ea7588c11c36b0e6ae95b0ede3189d142125e87c # Parent a48b3db0baba998ad627dfb4e1dd087222f15cb3 bundle2: update check for a generator to work on Python 3 diff -r a48b3db0baba -r ea7588c11c36 mercurial/bundle2.py --- a/mercurial/bundle2.py Mon Sep 18 13:35:43 2017 -0400 +++ b/mercurial/bundle2.py Mon Sep 18 13:36:05 2017 -0400 @@ -1019,7 +1019,8 @@ msg.append(')') if not self.data: msg.append(' empty payload') - elif util.safehasattr(self.data, 'next'): + elif (util.safehasattr(self.data, 'next') + or util.safehasattr(self.data, '__next__')): msg.append(' streamed payload') else: msg.append(' %i bytes payload' % len(self.data))