Mercurial > hg
comparison mercurial/commandserver.py @ 40357:efbf7de09d2a
py3: system-stringify list of attributes to be forwarded from commandserver.py
# skip-blame just some r'' prefixes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 16 Oct 2018 07:57:05 +0200 |
parents | 24e493ec2229 |
children | afbfcc4e3473 |
comparison
equal
deleted
inserted
replaced
40356:756e9b1084fd | 40357:efbf7de09d2a |
---|---|
64 # single write() to guarantee the same atomicity as the underlying file | 64 # single write() to guarantee the same atomicity as the underlying file |
65 self.out.write(struct.pack('>cI', self.channel, len(data)) + data) | 65 self.out.write(struct.pack('>cI', self.channel, len(data)) + data) |
66 self.out.flush() | 66 self.out.flush() |
67 | 67 |
68 def __getattr__(self, attr): | 68 def __getattr__(self, attr): |
69 if attr in ('isatty', 'fileno', 'tell', 'seek'): | 69 if attr in (r'isatty', r'fileno', r'tell', r'seek'): |
70 raise AttributeError(attr) | 70 raise AttributeError(attr) |
71 return getattr(self.out, attr) | 71 return getattr(self.out, attr) |
72 | 72 |
73 class channeledinput(object): | 73 class channeledinput(object): |
74 """ | 74 """ |
148 if not l: | 148 if not l: |
149 raise StopIteration | 149 raise StopIteration |
150 return l | 150 return l |
151 | 151 |
152 def __getattr__(self, attr): | 152 def __getattr__(self, attr): |
153 if attr in ('isatty', 'fileno', 'tell', 'seek'): | 153 if attr in (r'isatty', r'fileno', r'tell', r'seek'): |
154 raise AttributeError(attr) | 154 raise AttributeError(attr) |
155 return getattr(self.in_, attr) | 155 return getattr(self.in_, attr) |
156 | 156 |
157 class server(object): | 157 class server(object): |
158 """ | 158 """ |