~ubuntu-bugcontrol/apport/ubuntu-bugpatterns

« back to all changes in this revision

Viewing changes to search-bugs

  • Committer: Steve Langasek
  • Date: 2021-07-20 23:47:29 UTC
  • Revision ID: steve.langasek@canonical.com-20210720234729-k9tvhhbt8skpy826
More complete python3 support

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        return
68
68
    lines = []
69
69
    trim_re = re.compile('^\(.* ... \d+ .*\)$')
 
70
    if isinstance(report['DpkgTerminalLog'], bytes):
 
71
        report['DpkgTerminalLog'] = report['DpkgTerminalLog']\
 
72
                                          .decode('utf-8', errors='ignore')
70
73
    for line in report['DpkgTerminalLog'].splitlines():
71
74
        if line.startswith('Log started: ') or trim_re.match(line):
72
75
            lines = []
116
119
                   'In Progress', 'Fix Committed' ]
117
120
elif opt.status:
118
121
    if opt.status not in valid_status:
119
 
        print >> sys.stderr, ("Invalid status '%s'. Aborting") % (opt.status)
 
122
        print("Invalid status '%s'. Aborting" % (opt.status), file=sys.stderr)
120
123
        sys.exit(1)
121
124
    else:
122
125
        status_list.append(opt.status)
129
132
        print('Package %s not found in Ubuntu' % opt.package)
130
133
        sys.exit(1)
131
134
elif not opt.package:
132
 
    print >> sys.stderr, ("A package is required.")
 
135
    print("A package is required.", file=sys.stderr)
133
136
    sys.exit(1)
134
137
 
135
138
if opt.dupes: