deskbar-applet r2113 - in branches/gnome-2-22: . deskbar/handlers
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2113 - in branches/gnome-2-22: . deskbar/handlers
- Date: Mon, 14 Apr 2008 14:47:17 +0100 (BST)
Author: sebp
Date: Mon Apr 14 14:47:16 2008
New Revision: 2113
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2113&view=rev
Log:
Fixed exception that variable stream is unbound
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/deskbar/handlers/yahoo.py
Modified: branches/gnome-2-22/deskbar/handlers/yahoo.py
==============================================================================
--- branches/gnome-2-22/deskbar/handlers/yahoo.py (original)
+++ branches/gnome-2-22/deskbar/handlers/yahoo.py Mon Apr 14 14:47:16 2008
@@ -59,6 +59,7 @@
'results': 15})
matches = []
+ stream = None
try:
try:
stream = urllib.urlopen(url, proxies=get_proxy())
@@ -68,7 +69,8 @@
except ExpatError, e:
LOGGER.exception(e)
finally:
- stream.close()
+ if stream != None:
+ stream.close()
LOGGER.info('Got yahoo answer for: %s', qstring)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]