jenkins-bot has submitted this change and it was merged. Change subject: [bugfix] omit mode 600 warning for non-unix platforms ......................................................................
[bugfix] omit mode 600 warning for non-unix platforms - mode 600 is availlable for unix platforms only. Therefor re-read the changes and inform the user. Bug: T144157 Change-Id: I1bfac31cee201dbfe5b595fb7606663ec13f54f4 --- M pywikibot/comms/http.py 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 9fc29ae..0f6e083 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -84,7 +84,9 @@ st_mode = os.stat(filename).st_mode if stat.S_ISREG(st_mode) and (st_mode - stat.S_IFREG != mode_600): os.chmod(filename, mode_600) - pywikibot.warning(warn_str.format(filename, mode_600)) + # re-read and check changes + if os.stat(filename).st_mode != st_mode: + pywikibot.warning(warn_str.format(filename, mode_600)) def mode_check_decorator(func): -- To view, visit https://gerrit.wikimedia.org/r/308335 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1bfac31cee201dbfe5b595fb7606663ec13f54f4 Gerrit-PatchSet: 2 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: John Vandenberg <jay...@gmail.com> Gerrit-Reviewer: Merlijn van Deen <valhall...@arctus.nl> Gerrit-Reviewer: Mpaa <mpaa.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits