diff mercurial/hgweb/hgweb_mod.py @ 6797:8909070fd05e

merge another backout
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 02 Jul 2008 12:27:57 +0200
parents 943f066c0d58
children 95f35b553ae6
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Wed Jul 02 11:31:19 2008 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Wed Jul 02 12:27:57 2008 +0200
@@ -169,20 +169,23 @@
 
             req.write(content)
             del tmpl
-            return ''.join(content),
+            return []
 
         except revlog.LookupError, err:
             req.respond(HTTP_NOT_FOUND, ctype)
             msg = str(err)
             if 'manifest' not in msg:
                 msg = 'revision not found: %s' % err.name
-            return ''.join(tmpl('error', error=msg)),
+            req.write(tmpl('error', error=msg))
+            return []
         except (RepoError, revlog.RevlogError), inst:
             req.respond(HTTP_SERVER_ERROR, ctype)
-            return ''.join(tmpl('error', error=str(inst))),
+            req.write(tmpl('error', error=str(inst)))
+            return []
         except ErrorResponse, inst:
             req.respond(inst.code, ctype)
-            return ''.join(tmpl('error', error=inst.message)),
+            req.write(tmpl('error', error=inst.message))
+            return []
 
     def templater(self, req):