Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/hgwebdir_mod.py @ 18645:76ff3a715cf2
hgweb: simplify internal staticfile return codes
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 10 Feb 2013 18:24:29 +0100 |
parents | bf8bbbf4aa45 |
children | 7d31f2e42a8a |
comparison
equal
deleted
inserted
replaced
18644:3e92772d5383 | 18645:76ff3a715cf2 |
---|---|
195 if not static: | 195 if not static: |
196 tp = self.templatepath or templater.templatepath() | 196 tp = self.templatepath or templater.templatepath() |
197 if isinstance(tp, str): | 197 if isinstance(tp, str): |
198 tp = [tp] | 198 tp = [tp] |
199 static = [os.path.join(p, 'static') for p in tp] | 199 static = [os.path.join(p, 'static') for p in tp] |
200 return (staticfile(static, fname, req),) | 200 staticfile(static, fname, req) |
201 return [] | |
201 | 202 |
202 # top-level index | 203 # top-level index |
203 elif not virtual: | 204 elif not virtual: |
204 req.respond(HTTP_OK, ctype) | 205 req.respond(HTTP_OK, ctype) |
205 return self.makeindex(req, tmpl) | 206 return self.makeindex(req, tmpl) |