[lxml-dev] Patch for xpathgrep.py

Stefan Behnel stefan_ml at behnel.de
Mon Jun 9 22:56:00 CEST 2008



Thomas Schraitle wrote:
>  # Without(!) any filename:
>  $ xpathgrep.py /foo
> 
> I get this:
> 
> Traceback (most recent call last):
>   File "tools/xpathgrep.py", line 256, in <module>
>     found = main(options, args)
>   File "tools/xpathgrep.py", line 242, in main
>     sys.stdin, xpath, print_name, options.xinclude,
> UnboundLocalError: local variable 'print_name' referenced before 
> assignment

Ah, a copy&paste bug. Thanks.

Stefan



More information about the lxml-dev mailing list