Bug 1564363

Summary: [abrt] dnf: type2label(): updateinfo.py:283:type2label:KeyError: 'None'
Product: [Fedora] Fedora Reporter: Suvayu <fatkasuvayu>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: dmach, mblaha, mhatina, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ac1f1ed35ab6ba12857bf8e7d2b6c5e23284575a
Whiteboard: abrt_hash:3a1efe424249b4c2027240017602836c76245c9a;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-06 05:17:03 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:
Attachments:
Description Flags
File: _var_log_dnf.log
none
File: backtrace
none
File: cgroup
none
File: cpuinfo
none
File: dnf-makecache.log
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Suvayu 2018-04-06 04:40:46 UTC
Description of problem:
Sometimes `dnf updateinfo` crashes when I pass it arguments.  It is not always repeatable, but once it happens, it repeats itself.

I have had crashes with `dnf updateinfo --list` or `dnf updateinfo --info sec|security`.

Version-Release number of selected component:
dnf-2.7.5-8.fc28

Additional info:
reporter:       libreport-2.9.4
cmdline:        /usr/bin/python3 /usr/bin/dnf updateinfo --list
crash_function: type2label
exception_type: KeyError
executable:     /usr/bin/dnf
kernel:         4.16.0-0.rc5.git0.2.fc28.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
updateinfo.py:283:type2label:KeyError: 'None'

Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1016, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 417, in run
    display(apkg_adv_insts, mixed, description)
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 292, in display_list
    for (nevra, inst), id2type in cls._list(apkg_adv_insts))
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 292, in <genexpr>
    for (nevra, inst), id2type in cls._list(apkg_adv_insts))
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 290, in <genexpr>
    for id_, (typ, sev) in id2type.items()),
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/updateinfo.py", line 283, in type2label
    return (cls.SECURITY2LABEL[sev] if typ == hawkey.ADVISORY_SECURITY
KeyError: 'None'

Local variables in innermost frame:
sev: 'None'
typ: 1
cls: <class 'dnf.cli.commands.updateinfo.UpdateInfoCommand'>

Comment 1 Suvayu 2018-04-06 04:41:44 UTC
Created attachment 1417938 [details]
File: _var_log_dnf.log

Comment 2 Suvayu 2018-04-06 04:41:47 UTC
Created attachment 1417939 [details]
File: backtrace

Comment 3 Suvayu 2018-04-06 04:41:49 UTC
Created attachment 1417940 [details]
File: cgroup

Comment 4 Suvayu 2018-04-06 04:41:51 UTC
Created attachment 1417941 [details]
File: cpuinfo

Comment 5 Suvayu 2018-04-06 04:41:54 UTC
Created attachment 1417942 [details]
File: dnf-makecache.log

Comment 6 Suvayu 2018-04-06 04:42:12 UTC
Created attachment 1417943 [details]
File: environ

Comment 7 Suvayu 2018-04-06 04:42:14 UTC
Created attachment 1417944 [details]
File: mountinfo

Comment 8 Suvayu 2018-04-06 04:42:16 UTC
Created attachment 1417945 [details]
File: namespaces

Comment 9 Suvayu 2018-04-06 04:42:18 UTC
Created attachment 1417946 [details]
File: open_fds

Comment 10 Marek Blaha 2018-04-06 05:17:03 UTC

*** This bug has been marked as a duplicate of bug 1545075 ***