openwrt: more readline fun
The problem is that the current package parser excepts an array where
every line ends with a "\n" to it can be combined via `+=` in the
linebuffer. However the `urlopen().readlines()` returns an undecoded
byte array with `\n`, whereas
`urlopen().read().decode("utf-8").splitlines()` returns an decoded array
without the leading `\n`.
This approach now uses `map` to convert the bytes to strings and
preserve the newline. Instead of this spagetti code I'd like to rewrite
the parser function itself, however this would break current
compatibility.
In future I may migrate the parser function to `rblib/`.
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Loading
Please register or sign in to comment