Mercurial > public > mercurial-scm > hg
comparison mercurial/commandserver.py @ 40358:afbfcc4e3473
py3: alias next to __next__ in commandserver.py
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 16 Oct 2018 07:57:40 +0200 |
parents | efbf7de09d2a |
children | 558114fa7bc1 |
comparison
equal
deleted
inserted
replaced
40357:efbf7de09d2a | 40358:afbfcc4e3473 |
---|---|
146 def next(self): | 146 def next(self): |
147 l = self.readline() | 147 l = self.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 def __getattr__(self, attr): | 154 def __getattr__(self, attr): |
153 if attr in (r'isatty', r'fileno', r'tell', r'seek'): | 155 if attr in (r'isatty', r'fileno', r'tell', r'seek'): |
154 raise AttributeError(attr) | 156 raise AttributeError(attr) |
155 return getattr(self.in_, attr) | 157 return getattr(self.in_, attr) |