http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11575
Revision: 11575 Author: valhallasw Date: 2013-05-24 14:52:50 +0000 (Fri, 24 May 2013) Log Message: ----------- + auto-generate user files if they do not exist yet
Modified Paths: -------------- branches/rewrite/pwb.py
Modified: branches/rewrite/pwb.py =================================================================== --- branches/rewrite/pwb.py 2013-05-24 08:29:32 UTC (rev 11574) +++ branches/rewrite/pwb.py 2013-05-24 14:52:50 UTC (rev 11575) @@ -31,6 +31,9 @@ if "PYWIKIBOT2_DIR" not in os.environ: os.environ["PYWIKIBOT2_DIR"] = os.path.split(__file__)[0]
+if not os.path.exists(os.path.join(os.environ["PYWIKIBOT2_DIR"], "user-config.py")): + execfile('generate_user_files.py') + sys.argv.pop(0) if len(sys.argv) > 0: if not os.path.exists(sys.argv[0]):