jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/657098 )
Change subject: [bugfix] use string instead of Path-like object with "open"
function
......................................................................
[bugfix] use string instead of Path-like object with "open" function
open() function does not support Path-like object with Python prior to
3.6; a string is required for older Pythons.
Bug: T272345
Change-Id: Icd00d8ca88a06a5e08f02cd6b75114668d2c6d32
---
M pywikibot/specialbots/_upload.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
DannyS712: Looks good to me, but someone else must approve
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/specialbots/_upload.py b/pywikibot/specialbots/_upload.py
index cf96e67..77c7936 100644
--- a/pywikibot/specialbots/_upload.py
+++ b/pywikibot/specialbots/_upload.py
@@ -129,7 +129,7 @@
else:
headers = {}
- with open(path, 'ab') as fd:
+ with open(str(path), 'ab') as fd: # T272345: Python 3.5 needs str
os.lseek(handle, file_len, 0)
try:
response = http.fetch(file_url, stream=True,
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/657098
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Icd00d8ca88a06a5e08f02cd6b75114668d2c6d32
Gerrit-Change-Number: 657098
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: DannyS712 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits