hgweb: remove handling of any else than strings from request.write
Iterators should be returned WSGI style, not written. And apparently all of
hgweb do that.
--- a/mercurial/hgweb/request.py Tue Jan 15 01:05:12 2013 +0100
+++ b/mercurial/hgweb/request.py Tue Jan 15 01:05:12 2013 +0100
@@ -105,16 +105,11 @@
self.headers = []
def write(self, thing):
- if util.safehasattr(thing, "__iter__"):
- for part in thing:
- self.write(part)
- else:
- thing = str(thing)
- try:
- self.server_write(thing)
- except socket.error, inst:
- if inst[0] != errno.ECONNRESET:
- raise
+ try:
+ self.server_write(thing)
+ except socket.error, inst:
+ if inst[0] != errno.ECONNRESET:
+ raise
def writelines(self, lines):
for line in lines: