summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/rpm/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 54e9e6a9..926f66e4 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -138,7 +138,7 @@ class SpecFile(object):
self.specfile = os.path.basename(filename)
self.specdir = os.path.dirname(os.path.abspath(filename))
try:
- with open(filename) as spec_file:
+ with open(filename, errors='ignore') as spec_file:
for line in spec_file.readlines():
self._content.append(line)
except IOError as err:
@@ -870,7 +870,7 @@ def guess_spec_repo(repo, treeish, topdir='', recursive=True, preferred_name=Non
def spec_from_repo(repo, treeish, spec_path):
"""Get and parse a spec file from a give Git treeish"""
try:
- spec = SpecFile(filedata=repo.show('%s:%s' % (treeish, spec_path)).decode())
+ spec = SpecFile(filedata=repo.show('%s:%s' % (treeish, spec_path)).decode(errors='ignore'))
spec.specdir = os.path.dirname(spec_path)
spec.specfile = os.path.basename(spec_path)
return spec