Mercurial > hg
changeset 18350:c0d63e1884a3
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 15 Jan 2013 01:05:12 +0100 |
parents | c007e5c54b16 |
children | 3fbdbeab38cc |
files | mercurial/hgweb/request.py |
diffstat | 1 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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: