http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11577
Revision: 11577 Author: valhallasw Date: 2013-05-24 16:25:09 +0000 (Fri, 24 May 2013) Log Message: ----------- actually use locals() instead of using %(username)s as username
Modified Paths: -------------- branches/rewrite/generate_user_files.py
Modified: branches/rewrite/generate_user_files.py =================================================================== --- branches/rewrite/generate_user_files.py 2013-05-24 15:10:37 UTC (rev 11576) +++ branches/rewrite/generate_user_files.py 2013-05-24 16:25:09 UTC (rev 11577) @@ -217,7 +217,7 @@ while(raw_input("Do you want to add any other projects? (y/N)").upper() == "Y"): fam, mylang, username = get_site_and_lang() username = username or mainusername - f.write("usernames['%(fam)s']['%(mylang)s'] = u'%(username)s'\n") + f.write("usernames['%(fam)s']['%(mylang)s'] = u'%(username)s'\n" % locals())
f.close() print("'%s' written." % _fnc)