Mercurial > hg-stable
changeset 34285:ea7588c11c36
bundle2: update check for a generator to work on Python 3
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 18 Sep 2017 13:36:05 -0400 |
parents | a48b3db0baba |
children | 047f2af8ceb0 |
files | mercurial/bundle2.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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))