mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
scripts/oe-package-browser: Fix after overrides change
After the overrides change, the format of pkgdata changed and this usage of configparser no longer works. This change is a bandaid to make things work but the pkgdata format isn't very similar to ini files so this may need to be reimplmented in a better way in the long run. [YOCTO #14619] (From OE-Core rev: 25a8ec6e2891b71bc280aacaf5f62ecc4b0bd1d1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0a0052e456
commit
e21c967bd4
|
@ -49,11 +49,11 @@ def load(filename, suffix=None):
|
|||
from configparser import ConfigParser
|
||||
from itertools import chain
|
||||
|
||||
parser = ConfigParser()
|
||||
parser = ConfigParser(delimiters=('='))
|
||||
if suffix:
|
||||
parser.optionxform = lambda option: option.replace("_" + suffix, "")
|
||||
parser.optionxform = lambda option: option.replace(":" + suffix, "")
|
||||
with open(filename) as lines:
|
||||
lines = chain(("[fake]",), lines)
|
||||
lines = chain(("[fake]",), (line.replace(": ", " = ", 1) for line in lines))
|
||||
parser.read_file(lines)
|
||||
|
||||
# TODO extract the data and put it into a real dict so we can transform some
|
||||
|
|
Loading…
Reference in New Issue
Block a user