Skip to content

Commit

Permalink
[bouquetsreader] avoid possible crash caused by junk in bouquet files…
Browse files Browse the repository at this point in the history
… supplied in OE-A feeds
  • Loading branch information
Huevos committed Jan 15, 2022
1 parent 86c4192 commit 30765e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AutoBouquetsMaker/src/scanner/bouquetsreader.py
Expand Up @@ -16,11 +16,11 @@ def parseBouquetIndex(self, path, content):
filename = result.group(1)

try:
bouquet = open(path + "/" + filename, "r")
bouquet = open(path + "/" + filename, "rb")
except Exception as e:
continue

firstline = bouquet.read().split("\n")[0]
firstline = bouquet.read().split(b"\n")[0].decode(errors="ignore")
bouquet.close()

if firstline[:6] == "#NAME ":
Expand Down

0 comments on commit 30765e6

Please sign in to comment.