[Lumiera] menugen.py bug

Ichthyostega prg at ichthyostega.de
Wed Oct 31 02:23:56 CET 2018


On 10/30/18 7:09 PM, Christian Thaeter wrote:
> the menugen.py sometimes hangs when I ./build_website.sh
> 
> This only happens when there are some 'stale' files around, *.txt I
> put there for testing, other non related files
>  (rgrep something_to_investigate >,todo)
> 
> or editor backup files *.txt~1~
> 
> When it's stuck and I interrupt it I get following traceback (python is
> at 100% cpu then):
> 
> Traceback (most recent call last):
>   File "./menugen.py", line 1176, in <module>
>     parseAndDo()
>   File "./menugen.py", line 136, in parseAndDo
>     discoverPages(startdir)
>   File "./menugen.py", line 155, in discoverPages
>     discoverLocation (TREE_ROOT)
>   File "./menugen.py", line 162, in discoverLocation
>     discoverLocation (child, parent=node)
>   File "./menugen.py", line 162, in discoverLocation
>     discoverLocation (child, parent=node)
>   File "./menugen.py", line 162, in discoverLocation
>     discoverLocation (child, parent=node)

....looks like a endless recursive self invocation


def discoverLocation(loc, parent=None):
    file = findSource (loc)
    node = scanSource (loc, file, parent)
    for child in discoverChildren(node, loc):
        discoverLocation (child, parent=node)


...so the discovered "child" must be the node itself :-D


OK... I'll have a closer look and report back

-- Ichthyo


More information about the Lumiera mailing list