Bug 1655509 - Traceback when subscription manager when non-ascii passed as param.
Summary: Traceback when subscription manager when non-ascii passed as param.
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.7-Alt
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-03 10:37 UTC by Robin Hack
Modified: 2019-09-19 15:44 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-19 15:44:31 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Robin Hack 2018-12-03 10:37:59 UTC
Description of problem:
When subscription manager is used with non-ascii character as CLI param, traceback is invoked.


Version-Release number of selected component (if applicable):
subscription-manager-1.21.10-3.el7_6.x86_64

How reproducible:
always


Steps to Reproduce:
1. subscription-manager repos –list (please that - before list is different character!)
2.
3.

Actual results:
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 9, in <module>
    load_entry_point('subscription-manager==1.21.10', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2667, in main
    ret = CLI.main(self)
  File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 378, in main
    print(_("cannot parse argument: %s") % arg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 23: ordinal not in range(128)

Expected results:
Something nice.

Additional info:

Comment 2 Chris Snyder 2019-09-19 15:44:31 UTC
This requires change to the underlying libraries used for argument parsing that come from base python. Due to RHEL 7 being in Maintenance Support Phase 1, our team will not be able to fix this issue.


Note You need to log in before you can comment on or make changes to this bug.