Lokal Profil has uploaded a new change for review.
https://gerrit.wikimedia.org/r/299262
Change subject: Add two upload warnings
......................................................................
Add two upload warnings
Adds the bad-prefix and the page-exists upload warnings.
Also add graceful handling of simulation mode when using chunked
uploading.
Change-Id: Ife628004680399e047a75d1443e1d7ac0a22aabf
---
M pywikibot/site.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/62/299262/1
diff --git a/pywikibot/site.py b/pywikibot/site.py
index f8c6996..f4b6c18 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -5716,6 +5716,8 @@
'filetype-unwanted-type': "File %(msg)s type is unwanted type.",
'exists-normalized': 'File exists with different extension as '
'"%(msg)s".',
+ 'bad-prefix': "Target filename has a bad prefix %(msg)s.",
+ 'page-exists': "Target filename exists but with a different file
%(msg)s.",
}
# An offset != 0 doesn't make sense without a file key
@@ -5877,6 +5879,8 @@
if error.code == u'uploaddisabled':
self._uploaddisabled = True
raise error
+ if "nochange" in data: # in simulation mode
+ break
_file_key = data['filekey']
if 'warnings' in data and not ignore_all_warnings:
if callable(ignore_warnings):
--
To view, visit https://gerrit.wikimedia.org/r/299262
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife628004680399e047a75d1443e1d7ac0a22aabf
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits