Bug 1161856

Summary: [abrt] python3-iep: editorTabs.py:719:selectPreviousItem:UnboundLocalError: local variable 'item' referenced before assignment
Product: [Fedora] Fedora Reporter: Samuel Lee <samuel_lee_1991>
Component: python3-iepAssignee: Scott K Logan <logans>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 20CC: logans
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/ad2738b12becdb6661901ce0b00c0e6130fd1512
Whiteboard: abrt_hash:67a74988746f447382a301a7f5c6a534dcf553cb
Fixed In Version: python3-iep-3.5-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-27 02:55:02 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 Samuel Lee 2014-11-08 14:01:37 UTC
Version-Release number of selected component:
python3-iep-3.4-2.fc20

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python3 -m iep
executable:     /usr/lib/python3.3/site-packages/iep/__main__.py
kernel:         3.16.6-203.fc20.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
editorTabs.py:719:selectPreviousItem:UnboundLocalError: local variable 'item' referenced before assignment

Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/iep/iepcore/menu.py", line 296, in <lambda>
    a.triggered.connect(lambda b=None: callback())
  File "/usr/lib/python3.3/site-packages/iep/iepcore/editorTabs.py", line 719, in selectPreviousItem
    elif item is None and self.count():
UnboundLocalError: local variable 'item' referenced before assignment

Local variables in innermost frame:
self: <iep.iepcore.editorTabs.FileTabWidget object at 0x7f9b8c172050>

Comment 1 Samuel Lee 2014-11-08 14:01:40 UTC
Created attachment 955284 [details]
File: backtrace

Comment 2 Samuel Lee 2014-11-08 14:01:41 UTC
Created attachment 955285 [details]
File: environ

Comment 3 Scott K Logan 2014-11-08 20:45:44 UTC
Confirmed and reported upstream [1].

There are more bugs related to this issue which I attempted to fix in the PR.

A basic repro for issues related to this:
1. Open IEP
2. Attempt to select the previous tab (Ctrl+Tab)

or:
1. Open IEP
2. Close the default tab
3. Attempt to select the previous tab (Ctrl+Tab)

I will wait to hear from upstream before patching here.

[1] https://bitbucket.org/iep-project/iep/pull-request/14

Comment 4 Scott K Logan 2015-01-17 20:17:49 UTC
Wow, this one slipped off my radar. Patch was merged upstream, so I'll apply it here and release.

Comment 5 Fedora Update System 2015-01-17 20:59:45 UTC
python3-iep-3.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python3-iep-3.5-1.fc20

Comment 6 Fedora Update System 2015-01-17 20:59:52 UTC
python3-iep-3.5-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/python3-iep-3.5-1.fc21

Comment 7 Fedora Update System 2015-01-19 01:35:37 UTC
Package python3-iep-3.5-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 python3-iep-3.5-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0884/python3-iep-3.5-1.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2015-01-27 02:55:02 UTC
python3-iep-3.5-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-01-27 03:00:30 UTC
python3-iep-3.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.