Xqt has submitted this change and it was merged.
Change subject: pwb.py: allow different config directory using -dir: ......................................................................
pwb.py: allow different config directory using -dir:
Change-Id: I7643c189d06680c593d183c49d7324f8ab9f8e74 --- M pwb.py 1 file changed, 7 insertions(+), 0 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pwb.py b/pwb.py index ae732ed..6d58bbf 100644 --- a/pwb.py +++ b/pwb.py @@ -32,6 +32,13 @@ if "PYWIKIBOT2_DIR" not in os.environ: os.environ["PYWIKIBOT2_DIR"] = os.path.split(__file__)[0]
+for i,x in enumerate(sys.argv): + if x.startswith("-dir:"): + os.environ["PYWIKIBOT2_DIR"] = x[5:] + sys.argv.pop(i) + break + + if not os.path.exists(os.path.join(os.environ["PYWIKIBOT2_DIR"], "user-config.py")): execfile('generate_user_files.py')
pywikibot-commits@lists.wikimedia.org