fix issue 179 - propperly show the dependency chain of factories on setup failure

This commit is contained in:
Ronny Pfannschmidt
2012-08-22 21:43:42 +02:00
parent 503addbf09
commit e876ad9abd
3 changed files with 15 additions and 5 deletions

View File

@@ -1211,8 +1211,14 @@ class FuncargLookupErrorRepr(TerminalRepr):
def toterminal(self, tw):
tw.line()
for line in self.factblines or []:
tw.line(line)
if self.factblines:
tw.line(' dependency of:')
for factorydef in self.factblines:
tw.line(' %s in %s' % (
factorydef.argname,
factorydef.baseid,
))
tw.line()
for line in self.deflines:
tw.line(" " + line.strip())
for line in self.errorstring.split("\n"):