deskbar-applet r2213 - in branches/gnome-2-22: . deskbar/handlers
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2213 - in branches/gnome-2-22: . deskbar/handlers
- Date: Mon, 16 Jun 2008 11:51:17 +0000 (UTC)
Author: sebp
Date: Mon Jun 16 11:51:17 2008
New Revision: 2213
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2213&view=rev
Log:
Fixed bug #538425: local variable 'stream' referenced before assignment
Modified:
branches/gnome-2-22/ChangeLog
branches/gnome-2-22/deskbar/handlers/desklicious.py
Modified: branches/gnome-2-22/deskbar/handlers/desklicious.py
==============================================================================
--- branches/gnome-2-22/deskbar/handlers/desklicious.py (original)
+++ branches/gnome-2-22/deskbar/handlers/desklicious.py Mon Jun 16 11:51:17 2008
@@ -140,6 +140,7 @@
url = DEFAULT_QUERY_TAG % (urllib.quote_plus(self._user), urllib.quote_plus(tag))
LOGGER.debug("Opening URL %s", url)
+ stream = None
try:
try:
stream = urllib.urlopen(url, proxies=deskbar.core.Utils.get_proxy())
@@ -149,7 +150,8 @@
except ExpatError, e:
LOGGER.exception(e)
finally:
- stream.close()
+ if stream != None:
+ stream.close()
#And return the results
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]