~mwhudson/ubuntu-archive-scripts/rcbuggy-3.5

« back to all changes in this revision

Viewing changes to find-rcbuggy-problem-packages

  • Committer: Michael Hudson-Doyle
  • Date: 2019-09-11 01:33:41 UTC
  • Revision ID: michael.hudson@canonical.com-20190911013341-8za44rb59c08hfie
python 3.5 compat

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
args = parse_args()
57
57
 
58
58
def run_output(*cmd, **extra):
59
 
    kw = dict(check=True, encoding='ascii', stdout=subprocess.PIPE)
 
59
    encoding = extra.pop('encoding', 'ascii')
 
60
    kw = dict(check=True, stdout=subprocess.PIPE)
60
61
    kw.update(extra)
61
62
    cp = subprocess.run(cmd, **kw)
62
 
    return cp.stdout.strip()
 
63
    return cp.stdout.decode(encoding).strip()
63
64
 
64
65
def extract_uninstallable_to_src_pkg(output_fp):
65
66
    # Extract a mapping from binary package name to the set of source