Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 631872 - sys-apps/portage: egencache --update-use-local-desc unhandled xml.etree.ElementTree.ParseError
Summary: sys-apps/portage: egencache --update-use-local-desc unhandled xml.etree.Eleme...
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
Depends on:
Reported: 2017-09-23 20:19 UTC by Zac Medico
Modified: 2018-04-15 11:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2017-09-23 20:19:17 UTC
Any code using xml.etree.ElementTree needs to handle xml.etree.ElementTree.ParseError:

> Traceback (most recent call last):
>   File "/usr/lib/python-exec/python3.4/egencache", line 1119, in <module>
>     sys.exit(egencache_main(sys.argv[1:]))
>   File "/usr/lib/python-exec/python3.4/egencache", line 1067, in egencache_main
>   File "/usr/lib/python-exec/python3.4/egencache", line 602, in run
>     target=_MetadataTreeBuilder()))
>   File "/usr/lib64/python3.4/xml/etree/", line 1186, in parse
>     tree.parse(source, parser)
>   File "/usr/lib64/python3.4/xml/etree/", line 604, in parse
>     parser.feed(data)
> xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 13, column 18
Comment 1 Zac Medico gentoo-dev 2017-09-23 20:23:06 UTC
It's easy enough to trigger, for example an unexpected close tag raises this:

xml.etree.ElementTree.ParseError: mismatched tag: line 4, column 4