Bug 444333

Summary: yumdownloader: no params causes traceback
Product: [Fedora] Fedora Reporter: David Timms <dtimms>
Component: yum-utilsAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: james.antill, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-28 03:37:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Timms 2008-04-27 11:16:51 UTC
Description of problem:
Tried to get help for how to use downloader, but it excepted.

Version-Release number of selected component (if applicable):
yum-utils-1.1.13-2.fc9.noarch
yum-3.2.14-10.fc9.noarch
$ yumdownloader --version
yumdownloader - 1.0 (yum - 3.2.14)

How reproducible:
Both rawhide machines. F8 is OK.

Steps to Reproduce:
1. yumdownloader -d 10 --help  {or no parameter}
  
Actual results:
Loading "refresh-packagekit" plugin
Loaded plugins: refresh-packagekit
Config time: 0.268
Traceback (most recent call last):
  File "/usr/bin/yumdownloader", line 277, in <module>
    util = YumDownloader()
  File "/usr/bin/yumdownloader", line 42, in __init__
    self.main()
  File "/usr/bin/yumdownloader", line 51, in main
    opts = self.doUtilConfigSetup()
  File "/usr/share/yum-cli/utils.py", line 84, in doUtilConfigSetup
    (opts, self.cmds) = self._parser.setupYumConfig()
  File "/usr/share/yum-cli/cli.py", line 1009, in setupYumConfig
    (opts, cmds) = self.parse_args()
  File "/usr/lib/python2.5/optparse.py", line 1378, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python2.5/optparse.py", line 1418, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python2.5/optparse.py", line 1493, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python2.5/optparse.py", line 782, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python2.5/optparse.py", line 802, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/usr/share/yum-cli/cli.py", line 1102, in _wrapOptParseUsage
    self.base.usage()
  File "/usr/share/yum-cli/cli.py", line 909, in usage
    sys.stdout.write(self.optparser.format_help())
AttributeError: 'YumDownloader' object has no attribute 'optparser'

Expected results:
the 20 lines of help.

Additional info:
yumdownloader pavucontrol   [works]
yumdownloader --source pavucontrol   [works]
yumdownloader -d 10   [works] gives the help.

Comment 1 David Timms 2008-04-27 11:42:14 UTC
same with:
$ yum-builddep --help
Loaded plugins: refresh-packagekit
Traceback (most recent call last):
  File "/usr/bin/yum-builddep", line 139, in <module>
    util = YumBuildDep()
  File "/usr/bin/yum-builddep", line 41, in __init__
    self.main()
  File "/usr/bin/yum-builddep", line 48, in main
    opts = self.doUtilConfigSetup()
  File "/usr/share/yum-cli/utils.py", line 84, in doUtilConfigSetup
    (opts, self.cmds) = self._parser.setupYumConfig()
  File "/usr/share/yum-cli/cli.py", line 1009, in setupYumConfig
    (opts, cmds) = self.parse_args()
  File "/usr/lib/python2.5/optparse.py", line 1378, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib/python2.5/optparse.py", line 1418, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib/python2.5/optparse.py", line 1493, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib/python2.5/optparse.py", line 782, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib/python2.5/optparse.py", line 802, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/usr/share/yum-cli/cli.py", line 1102, in _wrapOptParseUsage
    self.base.usage()
  File "/usr/share/yum-cli/cli.py", line 909, in usage
    sys.stdout.write(self.optparser.format_help())
AttributeError: 'YumBuildDep' object has no attribute 'optparser'

Comment 2 Seth Vidal 2008-04-28 03:37:32 UTC
fixed up stream. this happened as a result of changes to yum for unicode cruft.