Bug 1048488 - AssertionError on invalid error log level
AssertionError on invalid error log level
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
Unspecified Linux
unspecified Severity low
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-04 11:11 EST by mail
Modified: 2014-09-30 19:41 EDT (History)
6 users (show)

See Also:
Fixed In Version: dnf-0.4.12-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 06:12:00 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mail 2014-01-04 11:11:22 EST
Description of problem:
dnf probably doesn't handle AssertionError exception when an invalid argument is passed from command line.

Version-Release number of selected component:
dnf-0:0.4.10-1.fc20.noarch

Steps to Reproduce:
dnf info -e 11
or any other command, using -e 11.

Actual results:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 240, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 63, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 101, in _main
    cli.configure(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1315, in configure
    self.read_conf_file(opts.conffile, root, releasever, overrides)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1421, in read_conf_file
    self.base.logging.setup_from_dnf_conf(conf)
  File "/usr/lib/python2.7/site-packages/dnf/logging.py", line 160, in setup_from_dnf_conf
    error_level_r = _cfg_err_val2level(conf.errorlevel)
  File "/usr/lib/python2.7/site-packages/dnf/logging.py", line 80, in _cfg_err_val2level
    assert(0 <= cfg_errval <= 10)
AssertionError

Expected results:
Expected some textual error
Comment 1 Ales Kozumplik 2014-01-06 02:29:19 EST
Radek I guess this one's for you.
Comment 2 Ales Kozumplik 2014-01-06 02:29:51 EST
oh hang on, actually not:)
Comment 3 Ales Kozumplik 2014-01-14 04:57:32 EST
Fixed upstream by c2ab539.
Comment 4 Fedora Update System 2014-01-21 02:39:56 EST
dnf-0.4.12-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.12-1.fc20
Comment 5 Fedora Update System 2014-01-21 22:11:44 EST
Package dnf-0.4.12-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.12-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1270/dnf-0.4.12-1.fc20
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2014-01-23 06:12:00 EST
dnf-0.4.12-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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