mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Ignore errors on reading license info with dpkg_lowpkg
This commit is contained in:
parent
42e51f4c46
commit
153af833ce
1 changed files with 1 additions and 1 deletions
|
@ -319,7 +319,7 @@ def _get_pkg_license(pkg):
|
|||
licenses = set()
|
||||
cpr = "/usr/share/doc/{}/copyright".format(pkg)
|
||||
if os.path.exists(cpr):
|
||||
with salt.utils.files.fopen(cpr) as fp_:
|
||||
with salt.utils.files.fopen(cpr, errors="ignore") as fp_:
|
||||
for line in salt.utils.stringutils.to_unicode(fp_.read()).split(os.linesep):
|
||||
if line.startswith("License:"):
|
||||
licenses.add(line.split(":", 1)[1].strip())
|
||||
|
|
Loading…
Add table
Reference in a new issue