mercurial/hgweb/hgweb_mod.py
changeset 36876 97f44b0720e2
parent 36872 89002d07a114
child 36877 02bea04b4c54
equal deleted inserted replaced
36875:16499427f6de 36876:97f44b0720e2
   406                 res.headers['Content-Type'] = ctype
   406                 res.headers['Content-Type'] = ctype
   407                 content = getattr(webcommands, cmd)(rctx, wsgireq, tmpl)
   407                 content = getattr(webcommands, cmd)(rctx, wsgireq, tmpl)
   408 
   408 
   409                 if content is res:
   409                 if content is res:
   410                     return res.sendresponse()
   410                     return res.sendresponse()
   411 
   411                 elif content is True:
   412                 wsgireq.respond(HTTP_OK, ctype)
   412                     return []
   413 
   413                 else:
   414             return content
   414                     wsgireq.respond(HTTP_OK, ctype)
       
   415                     return content
   415 
   416 
   416         except (error.LookupError, error.RepoLookupError) as err:
   417         except (error.LookupError, error.RepoLookupError) as err:
   417             wsgireq.respond(HTTP_NOT_FOUND, ctype)
   418             wsgireq.respond(HTTP_NOT_FOUND, ctype)
   418             msg = pycompat.bytestr(err)
   419             msg = pycompat.bytestr(err)
   419             if (util.safehasattr(err, 'name') and
   420             if (util.safehasattr(err, 'name') and