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')
--
To view, visit https://gerrit.wikimedia.org/r/79578
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7643c189d06680c593d183c49d7324f8ab9f8e74
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits