Codebase list distro-info / de11a02
python: Open debian/changelog explicitly as UTF-8 The package build failed on the buildd hosts: ``` cd python && python3.6 setup.py test Traceback (most recent call last): File "setup.py", line 32, in <module> version=get_debian_version(), File "setup.py", line 22, in get_debian_version head = open(changelog).readline() File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 111: ordinal not in range(128) ``` Benjamin Drung 5 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1818 version = None
1919 changelog = "../debian/changelog"
2020 if os.path.exists(changelog):
21 head = open(changelog).readline()
21 head = open(changelog, "rb").readline().decode("utf-8")
2222 match = re.compile(r".*\((.*)\).*").match(head)
2323 if match:
2424 version = match.group(1)