fixed crashing on non-utf-8 chars in pkgbuilds

This commit is contained in:
2020-08-15 14:14:15 +02:00
parent 7a92f9aad6
commit 43c2f8bcff

View File

@@ -9,9 +9,9 @@ import subprocess
import sys
import time
from queue import Queue, Empty
from packaging import version
import yaml
from packaging import version
regex_pkgver = re.compile(r"^pkgrel\s*=\s*(.+)$", re.MULTILINE)
regex_pkgrel = re.compile(r"^pkgrel\s*=\s*(.+)$", re.MULTILINE)
@@ -143,7 +143,7 @@ def setup_makepkg(repo):
def import_keys(pkgbuild):
with open(pkgbuild) as pkgb:
with open(pkgbuild, errors='ignore') as pkgb:
keys_s = regex_validkeys.findall(pkgb.read())
if keys_s: