We gotta trash the error stream because gzip complains about broken pipe when ran in python subprocess ~.~

This commit is contained in:
Alexandre Aubin 2020-05-09 15:58:40 +02:00 committed by GitHub
parent aecbb14aa4
commit d8dfa1c5d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ def get_ynh_package_version(package):
# may handle changelog differently !
changelog = "/usr/share/doc/%s/changelog.gz" % package
cmd = "gzip -cd %s | head -n1" % changelog
cmd = "gzip -cd %s 2>/dev/null | head -n1" % changelog
if not os.path.exists(changelog):
return {"version": "?", "repo": "?"}
out = check_output(cmd).split()