Xqt has submitted this change and it was merged.
Change subject: Make generate_user_files.py work for other directories ......................................................................
Make generate_user_files.py work for other directories
Use os.path.abspath(__file__) instead of os.path.abspath(sys.argv[0])
Change-Id: I3172c29352f9e7bddc8de173e6057fd9172e167a --- M generate_user_files.py 1 file changed, 1 insertion(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/generate_user_files.py b/generate_user_files.py index b8a0064..8f4f7dd 100644 --- a/generate_user_files.py +++ b/generate_user_files.py @@ -176,11 +176,8 @@ if choice in "SE": break
- # - # I don't like this solution. Temporary for me. - # # determine what directory this script (generate_user_files.py) lives in - install = os.path.dirname(os.path.abspath(sys.argv[0])) + install = os.path.dirname(os.path.abspath(__file__)) # config2.py will be in the pywikibot/ directory f = codecs.open(os.path.join(install, "pywikibot", "config2.py"), "r", "utf-8")
pywikibot-commits@lists.wikimedia.org