Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
package_manager: Py3 fix: parse_package_metadata processes strings
I attempted to update the version of package_manager to the latest, since I noticed the line numbers in error messages did not match. I got the following error, which I think this change should fix. The problem is that dpkg_parser calls this function with the output of gzip.open(path, 'rb'), so the input is binary (python3 str). To fix it, convert the data argument from binary to text if necessary. dpkg_parser command failed: Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "dpkg_parser/file/downloaded/__main__.py", line 196, in <module> File "dpkg_parser/file/downloaded/__main__.py", line 77, in main File "dpkg_parser/file/downloaded/__main__.py", line 191, in download_package_list File "dpkg_parser/file/downloaded/distroless/package_manager/parse_metadata.py", line 34, in parse_package_metadata File "/usr/lib/python3.6/re.py", line 172, in match return _compile(pattern, flags).match(string) TypeError: cannot use a string pattern on a bytes-like object
- Loading branch information