[Buildbot-commits] [Buildbot] #2120: TextLog.getChild broken
Buildbot
nobody at buildbot.net
Mon Oct 3 05:15:00 UTC 2011
#2120: TextLog.getChild broken
-------------------+-----------------------
Reporter: szager | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: master | Keywords:
-------------------+-----------------------
In master/buildbot/status/web/logs.py, this looks fishy to me:
class TextLog(Resource):
....
def getChild(self, path, req):
if path == "text":
self.asText = True
return self
return HtmlResource.getChild(self, path, req)
As you can see, TextLog doesn't inherit from HtmlResource, so the call to
HtmlResource.getChild is broken. Indeed, when I hit that code path, I get
this exception:
in getChild
return HtmlResource.getChild(self, path, req)
exceptions.TypeError: unbound method getChild() must be called
with HtmlResource instance as first argument (got TextLog instance
instead)
I believe this ought to fix it:
index cb201bf..79b953a 100644
--- a/master/buildbot/status/web/logs.py
+++ b/master/buildbot/status/web/logs.py
@@ -65,7 +65,7 @@ class TextLog(Resource):
if path == "text":
self.asText = True
return self
- return HtmlResource.getChild(self, path, req)
+ return Resource.getChild(self, path, req)
def content(self, entries):
html_entries = []
Thanks,
Stefan
--
Ticket URL: <http://trac.buildbot.net/ticket/2120>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list