Skip to content
Commit 03bfcb70 authored by Paul Spooren's avatar Paul Spooren Committed by Holger Levsen
Browse files

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: default avatarHolger Levsen <holger@layer-acht.org>
parent 0443a133
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment