Hack to treat files as text/plain
This commit is contained in:
parent
1ba38b09a8
commit
27125d82ae
1 changed files with 9 additions and 1 deletions
10
master.cfg
10
master.cfg
|
@ -81,6 +81,14 @@ cc_re_tuple = (r'(PR [a-z]+/|PR ?|#)(\d+)',
|
||||||
from buildbot.status import html
|
from buildbot.status import html
|
||||||
from buildbot.status.web import authz, auth
|
from buildbot.status.web import authz, auth
|
||||||
|
|
||||||
|
## The following class is a hack. It is needed because Builbot's
|
||||||
|
## webserver treats everything it doesn't know as text/html. Sigh...
|
||||||
|
class WebStatusWithTextDefault(html.WebStatus):
|
||||||
|
def setupSite(self):
|
||||||
|
result = html.WebStatus.setupSite(self)
|
||||||
|
self.site.resource.defaultType = "text/plain"
|
||||||
|
return result
|
||||||
|
|
||||||
authz_cfg=authz.Authz(
|
authz_cfg=authz.Authz(
|
||||||
# change any of these to True to enable; see the manual for more
|
# change any of these to True to enable; see the manual for more
|
||||||
# options
|
# options
|
||||||
|
@ -93,7 +101,7 @@ authz_cfg=authz.Authz(
|
||||||
stopAllBuilds = True,
|
stopAllBuilds = True,
|
||||||
cancelPendingBuild = True,
|
cancelPendingBuild = True,
|
||||||
)
|
)
|
||||||
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
|
c['status'].append(WebStatusWithTextDefault (http_port=8010, authz=authz_cfg))
|
||||||
|
|
||||||
#c['status'].append(html.WebStatus(http_port=8010,
|
#c['status'].append(html.WebStatus(http_port=8010,
|
||||||
# forceBuild = True,
|
# forceBuild = True,
|
||||||
|
|
Loading…
Reference in a new issue