Revision: 6658 Author: nicdumz Date: 2009-04-22 08:35:52 +0000 (Wed, 22 Apr 2009)
Log Message: ----------- Foolw-up to r6656 : we can't iterate on globals().
Back to globals().keys() instead of globals().iterkeys() ( RuntimeError: dictionary changed size during iteration )
Modified Paths: -------------- branches/rewrite/pywikibot/config2.py
Modified: branches/rewrite/pywikibot/config2.py =================================================================== --- branches/rewrite/pywikibot/config2.py 2009-04-22 02:17:00 UTC (rev 6657) +++ branches/rewrite/pywikibot/config2.py 2009-04-22 08:35:52 UTC (rev 6658) @@ -482,7 +482,7 @@ % {'fn' :_filename}
# Test for obsoleted and/or unknown variables. -for _key in globals().iterkeys(): +for _key in globals().keys(): if _key[0]=='_': pass elif _key in _gl: @@ -577,7 +577,7 @@
# cleanup all locally-defined variables
-for __var in globals().iterkeys(): +for __var in globals().keys(): if __var.startswith("_") and not __var.startswith("__"): del __sys.modules[__name__].__dict__[__var]
pywikipedia-svn@lists.wikimedia.org