|
9 | 9 | # This work is licensed under the GNU GPLv2 or later. |
10 | 10 | # See the COPYING file in the top-level directory. |
11 | 11 |
|
12 | | -from __future__ import print_function |
13 | | - |
14 | 12 | import argparse |
15 | 13 | import base64 |
16 | 14 | import datetime |
|
28 | 26 |
|
29 | 27 | import bugzilla |
30 | 28 | from bugzilla._compatimports import Fault, ProtocolError, urlparse |
31 | | -from bugzilla._util import to_encoding |
32 | 29 |
|
33 | 30 |
|
34 | 31 | DEFAULT_BZ = 'https://bugzilla.redhat.com' |
@@ -620,13 +617,12 @@ def _filter_components(compdetails): |
620 | 617 | elif opt.versions: |
621 | 618 | proddict = bz.getproducts()[0] |
622 | 619 | for v in proddict['versions']: |
623 | | - print(to_encoding(v["name"])) |
| 620 | + print(str(v["name"] or '')) |
624 | 621 |
|
625 | 622 | elif opt.component_owners: |
626 | 623 | details = bz.getcomponentsdetails(productname) |
627 | 624 | for c in sorted(_filter_components(details)): |
628 | | - print(to_encoding(u"%s: %s" % (c, |
629 | | - details[c]['default_assigned_to']))) |
| 625 | + print(u"%s: %s" % (c, details[c]['default_assigned_to'])) |
630 | 626 |
|
631 | 627 |
|
632 | 628 | def _convert_to_outputformat(output): |
@@ -691,8 +687,7 @@ def _format_output_raw(buglist): |
691 | 687 | continue |
692 | 688 | if attrname.startswith("_"): |
693 | 689 | continue |
694 | | - print(to_encoding(u"ATTRIBUTE[%s]: %s" % |
695 | | - (attrname, b.__dict__[attrname]))) |
| 690 | + print("ATTRIBUTE[%s]: %s" % (attrname, b.__dict__[attrname])) |
696 | 691 | print("\n\n") |
697 | 692 |
|
698 | 693 |
|
@@ -758,7 +753,7 @@ def _bug_field_repl_cb(bz, b, matchobj): |
758 | 753 | val = getattr(b, fieldname, "") |
759 | 754 |
|
760 | 755 | vallist = isinstance(val, list) and val or [val] |
761 | | - val = ','.join([to_encoding(v) for v in vallist]) |
| 756 | + val = ','.join([str(v or '') for v in vallist]) |
762 | 757 |
|
763 | 758 | return val |
764 | 759 |
|
|
0 commit comments