deskbar-applet r2086 - in trunk: . deskbar/handlers
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: deskbar-applet r2086 - in trunk: . deskbar/handlers
- Date: Tue, 8 Apr 2008 22:12:03 +0100 (BST)
Author: sebp
Date: Tue Apr 8 22:12:03 2008
New Revision: 2086
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2086&view=rev
Log:
Close prefs_file
Modified:
trunk/ChangeLog
trunk/deskbar/handlers/mozilla.py
Modified: trunk/deskbar/handlers/mozilla.py
==============================================================================
--- trunk/deskbar/handlers/mozilla.py (original)
+++ trunk/deskbar/handlers/mozilla.py Tue Apr 8 22:12:03 2008
@@ -109,14 +109,13 @@
try:
if USING_FIREFOX:
prefs_file = file(get_firefox_home_file("prefs.js"))
- else:
- # TODO - similar functionality for old-school mozilla (not firefox)
- prefs_file = None
- for line in prefs_file:
- if line.startswith('user_pref("browser.search.selectedEngine", "'):
- line = line.strip()
- PRIMARY_SEARCH_ENGINE = line[len('user_pref("browser.search.selectedEngine", "'):-len('");')]
- break
+ for line in prefs_file:
+ if line.startswith('user_pref("browser.search.selectedEngine", "'):
+ line = line.strip()
+ PRIMARY_SEARCH_ENGINE = line[len('user_pref("browser.search.selectedEngine", "'):-len('");')]
+ break
+ prefs_file.close()
+ # TODO - similar functionality for old-school mozilla (not firefox)
except:
pass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]