Bug 179512
| Summary: | yum - a call with a non-existent configuration file results in a traceback | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michal Jaegermann <michal> |
| Component: | yum | Assignee: | Jeremy Katz <katzj> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | katzj |
| 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: | 2006-02-10 06:42:23 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: | |||
thanks - fixed in upstream. will be out in yum 2.5.2 |
Description of problem: If 'yum' is called like, say, that: yum -c ./local.conf update but local.conf does not exist (a typo in a path, or temporary inaccesible if retrieved over a network) then, instead of bailing out with an error message, 'yum' produces this misleading traceback: Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.main(sys.argv[1:]) File "/usr/share/yum-cli/yummain.py", line 80, in main base.getOptionsConfig(args) File "/usr/share/yum-cli/cli.py", line 169, in getOptionsConfig self.doConfigSetup(fn=opts.conffile, root=root) File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 97, in doConfigSetup self.conf = config.readMainConfig(fn, root) File "/usr/lib/python2.4/site-packages/yum/config.py", line 482, in readMainConfig setattr(yumconf, option, yumconf.installroot + path) File "/usr/lib/python2.4/site-packages/yum/config.py", line 72, in __set__ optdata.parser.set(optdata.section, optdata.name, strvalue) File "/usr/lib/python2.4/site-packages/yum/parser.py", line 181, in set return ConfigParser.set(self, section, option, value) File "/usr/lib64/python2.4/ConfigParser.py", line 358, in set raise NoSectionError(section) ConfigParser.NoSectionError: No section: 'main' Indeed, there is no section 'main', or any other one, if the file cannot be accessed. Version-Release number of selected component (if applicable): yum-2.5.1-2