Bug 376711 - Better error message is needed when file is missing
Better error message is needed when file is missing
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
Depends On:
  Show dependency treegraph
Reported: 2007-11-11 19:07 EST by Bernard Johnson
Modified: 2013-01-09 23:30 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.9.7-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-07 16:44:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bernard Johnson 2007-11-11 19:07:20 EST
Description of problem:
I keep my own .cfg files local so they are easy to edit.  Because of this, I use
the --configdir option.  If you are using a different config directory, upgrade
mock, and don't notice that it now needs a logging.ini, you get:

INFO: mock suid wrapper version 0.8.4 
ERROR:root:No section: 'formatters'
Traceback (most recent call last):
  File "/usr/libexec/mock.py", line 333, in <module>
  File "/usr/libexec/mock.py", line 239, in main
  File "/usr/lib/python2.5/logging/config.py", line 76, in fileConfig
    formatters = _create_formatters(cp)
  File "/usr/lib/python2.5/logging/config.py", line 107, in _create_formatters
    flist = cp.get("formatters", "keys")
  File "/usr/lib/python2.5/ConfigParser.py", line 511, in get
    raise NoSectionError(section)
NoSectionError: No section: 'formatters'

Why can't it just say:
ERROR: ~/myconfigdir/logging.ini not found

Version-Release number of selected component (if applicable):

How reproducible:
Comment 1 Clark Williams 2008-03-07 16:44:00 EST
Checked for existence of logging.ini and error out if it's not found

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