Bug 1015039

Summary: "NameError: global name 'e' is not defined" in network connection check exception handler
Product: [Fedora] Fedora Reporter: Lukas Middendorf <lukas+fedora>
Component: yumexAssignee: Tim Lauridsen <tla>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: per.arnold, segg.gill, tla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yumex-3.0.13-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-24 00:54:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
patch to fix the problem none

Description Lukas Middendorf 2013-10-03 11:12:13 UTC
Created attachment 807008 [details]
patch to fix the problem

Description of problem:
I do not use NetworkManager, so the yumex network connection check fails. Since 3.0.12 the exception handler in /usr/lib/python2.7/site-packages/yumexbase/network.py is broken and leads to a crash.

Version-Release number of selected component (if applicable):
yumex 3.0.12-1

Steps to Reproduce:
1. Use static networking instead of NetworkManager
2. Start yumex with network connection check enabled

Actual results:
crash with
Traceback (most recent call last):
  File "/usr/bin/yumex", line 62, in <module>
    app = YumexApplication(backend)
  File "/usr/lib/python2.7/site-packages/yumexgui/__init__.py", line 211, in __init__
    Controller.__init__(self, BUILDER_FILE , 'main', domain='yumex')
  File "/usr/lib/python2.7/site-packages/guihelpers/__init__.py", line 280, in __init__
    self.ui.connect_signals(self._getAllMethods())
  File "/usr/lib/python2.7/site-packages/guihelpers/__init__.py", line 310, in _getAllMethods
    value = getattr(self, name)
  File "/usr/lib/python2.7/site-packages/yumexgui/__init__.py", line 260, in is_offline
    rc = self._network.check_network_connection()
  File "/usr/lib/python2.7/site-packages/yumexbase/network.py", line 92, in check_network_connection
    print str(e)
NameError: global name 'e' is not defined

Expected results:
should not crash but just output a warning

Additional info:
I have attached a patch to fix the problem

Comment 1 Tim Lauridsen 2013-10-03 15:03:56 UTC
Thanks, fixed upstream

https://github.com/timlau/yumex/commit/9e84bf760fe0025d313254f09f1256b1640f1771

See here how to test:
http://www.yumex.dk/p/how-to-test.html

Comment 2 Gilles J. Seguin 2013-10-04 17:06:08 UTC
(In reply to Tim Lauridsen from comment #1)
> Thanks, fixed upstream

thanks for quick fix, it work here

Comment 3 Tim Lauridsen 2013-10-08 10:20:05 UTC
*** Bug 1016400 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2013-10-16 06:24:17 UTC
yumex-3.0.13-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yumex-3.0.13-1.fc20

Comment 5 Fedora Update System 2013-10-16 06:24:37 UTC
yumex-3.0.13-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yumex-3.0.13-1.fc19

Comment 6 Fedora Update System 2013-10-17 20:27:36 UTC
Package yumex-3.0.13-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 yumex-3.0.13-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19167/yumex-3.0.13-1.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-10-24 00:54:23 UTC
yumex-3.0.13-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2013-11-10 07:08:09 UTC
yumex-3.0.13-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.