Bug 1015039 - "NameError: global name 'e' is not defined" in network connection check exception handler
Summary: "NameError: global name 'e' is not defined" in network connection check excep...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yumex
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tim Lauridsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1016400 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-03 11:12 UTC by Lukas Middendorf
Modified: 2013-11-10 07:08 UTC (History)
3 users (show)

Fixed In Version: yumex-3.0.13-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-24 00:54:23 UTC
Type: Bug


Attachments (Terms of Use)
patch to fix the problem (443 bytes, patch)
2013-10-03 11:12 UTC, Lukas Middendorf
no flags Details | Diff

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.


Note You need to log in before you can comment on or make changes to this bug.