[Pywikipedia-l] SVN: [4642] trunk/pywikipedia/maintenance/preferences.py
btongminh at svn.wikimedia.org
btongminh at svn.wikimedia.org
Fri Dec 7 21:13:34 UTC 2007
Revision: 4642
Author: btongminh
Date: 2007-12-07 21:13:29 +0000 (Fri, 07 Dec 2007)
Log Message:
-----------
Making preference setting work with non-persistent connections
Modified Paths:
--------------
trunk/pywikipedia/maintenance/preferences.py
Modified: trunk/pywikipedia/maintenance/preferences.py
===================================================================
--- trunk/pywikipedia/maintenance/preferences.py 2007-12-07 21:10:41 UTC (rev 4641)
+++ trunk/pywikipedia/maintenance/preferences.py 2007-12-07 21:13:29 UTC (rev 4642)
@@ -150,7 +150,10 @@
(key, site, prev, value))
prefs.set(key, value)
prefs.save()
- site.conn.close()
+ try:
+ site.conn.close()
+ except AttributeError:
+ pass
def main():
More information about the Pywikipedia-l
mailing list