Bug 1048488 - AssertionError on invalid error log level
Summary: AssertionError on invalid error log level
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-04 16:11 UTC by mail
Modified: 2014-09-30 23:41 UTC (History)
6 users (show)

Fixed In Version: dnf-0.4.12-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-23 11:12:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description mail 2014-01-04 16:11:22 UTC
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 07:29:19 UTC
Radek I guess this one's for you.

Comment 2 Ales Kozumplik 2014-01-06 07:29:51 UTC
oh hang on, actually not:)

Comment 3 Ales Kozumplik 2014-01-14 09:57:32 UTC
Fixed upstream by c2ab539.

Comment 4 Fedora Update System 2014-01-21 07:39:56 UTC
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-22 03:11:44 UTC
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 11:12:00 UTC
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.