Bug 1220040

Summary: [abrt] python-dnf: completion_helper.py:92:run:UnboundLocalError: local variable 'pkgs' referenced before assignment
Product: [Fedora] Fedora Reporter: Valerio De Angelis <valeriodean>
Component: dnfAssignee: Igor Gnatenko <ignatenko>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 22CC: fetizon.charles, ignatenko, jsilhan, kamil.walerianczyk, l4coa3fnjplr, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/795ee1dc1afa0da3c1dbc1779569bcdb91f97a63
Whiteboard: abrt_hash:bbd9cef516a0a40a73d14b5518526d36db37e15d
Fixed In Version: dnf-1.0.2-3.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-11 02:08:26 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: backtrace
none
File: environ none

Description Valerio De Angelis 2015-05-09 12:29:12 UTC
Description of problem:
Just writing "dnf list auto" then I pressed TAB to autocomplete, then the error apperas.

Version-Release number of selected component:
python-dnf-1.0.0-1.fc22

Additional info:
reporter:       libreport-2.5.1
cmdline:        python2 /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py list autoremove '' -d 0 -q -C
executable:     /usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py
kernel:         4.0.1-300.fc22.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
completion_helper.py:92:run:UnboundLocalError: local variable 'pkgs' referenced before assignment

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 189, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 185, in main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1077, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/completion_helper.py", line 92, in run
    for pkg in pkgs:
UnboundLocalError: local variable 'pkgs' referenced before assignment

Local variables in innermost frame:
self: <__main__.ListCompletionCommand object at 0x7f8eefa53350>
args: ['autoremove', '']
subcmds: [u'all', u'available', u'installed', u'updates', u'extras', u'autoremove', u'obsoletes', u'recent']

Comment 1 Valerio De Angelis 2015-05-09 12:29:16 UTC
Created attachment 1023728 [details]
File: backtrace

Comment 2 Valerio De Angelis 2015-05-09 12:29:18 UTC
Created attachment 1023729 [details]
File: environ

Comment 3 Honza Silhan 2015-06-23 08:44:48 UTC
Thanks for the report. Igor, can you take a look what's going wrong, please?

Comment 5 Fedora Update System 2015-07-22 08:25:20 UTC
dnf-1.0.2-2.fc22,hawkey-0.5.9-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-1.0.2-2.fc22,hawkey-0.5.9-2.fc22

Comment 6 Fedora Update System 2015-08-01 02:28:29 UTC
Package dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-1.0.2-3.fc22 hawkey-0.5.9-3.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12577/dnf-1.0.2-3.fc22,hawkey-0.5.9-3.fc22
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2015-08-11 02:08:26 UTC
dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.