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():
pywikipedia-l@lists.wikimedia.org