Bug 376711 - Better error message is needed when file is missing
Summary: Better error message is needed when file is missing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-12 00:07 UTC by Bernard Johnson
Modified: 2013-01-10 04:30 UTC (History)
1 user (show)

Fixed In Version: 0.9.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-03-07 21:44:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Bernard Johnson 2007-11-12 00:07:20 UTC
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>
    main(retParams)
  File "/usr/libexec/mock.py", line 239, in main
    logging.config.fileConfig(os.path.join(config_path,
config_opts["log_config_file"]))
  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):
mock-0.8.4-2.fc7

How reproducible:
Always

Comment 1 Clark Williams 2008-03-07 21:44:00 UTC
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.