[MediaWiki-commits] [Gerrit] [FIX] PatrolEntry: Allow cur/prev id to be str - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/223862 Change subject: [FIX] PatrolEntry: Allow cur/prev id to be str .. [FIX] PatrolEntry: Allow cur/prev id to be str Sometimes PatrolEntry returns str instead of int for the revision ids. See also bug T101603. Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba --- M pywikibot/logentries.py 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/62/223862/1 diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 238f0b2..40dfb14 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -298,15 +298,17 @@ def current_id(self): Return the current id. # key has been changed in mw 1.19; try the new mw style first -return (self._params['curid'] -if 'curid' in self._params else self._params['cur']) +# sometimes it returns strs sometimes ints +return int(self._params['curid'] + if 'curid' in self._params else self._params['cur']) @property def previous_id(self): -# key has been changed in mw 1.19; try the new mw style first Return the previous id. -return (self._params['previd'] -if 'previd' in self._params else self._params['prev']) +# key has been changed in mw 1.19; try the new mw style first +# sometimes it returns strs sometimes ints +return int(self._params['previd'] + if 'previd' in self._params else self._params['prev']) @property def auto(self): -- To view, visit https://gerrit.wikimedia.org/r/223862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] PatrolEntry: Allow cur/prev id to be str - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] PatrolEntry: Allow cur/prev id to be str .. [FIX] PatrolEntry: Allow cur/prev id to be str Sometimes PatrolEntry returns str instead of int for the revision ids. See also bug T101603. Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba --- M pywikibot/logentries.py 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 238f0b2..40dfb14 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -298,15 +298,17 @@ def current_id(self): Return the current id. # key has been changed in mw 1.19; try the new mw style first -return (self._params['curid'] -if 'curid' in self._params else self._params['cur']) +# sometimes it returns strs sometimes ints +return int(self._params['curid'] + if 'curid' in self._params else self._params['cur']) @property def previous_id(self): -# key has been changed in mw 1.19; try the new mw style first Return the previous id. -return (self._params['previd'] -if 'previd' in self._params else self._params['prev']) +# key has been changed in mw 1.19; try the new mw style first +# sometimes it returns strs sometimes ints +return int(self._params['previd'] + if 'previd' in self._params else self._params['prev']) @property def auto(self): -- To view, visit https://gerrit.wikimedia.org/r/223862 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: 2.0 Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: XZise commodorefabia...@gmx.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] PatrolEntry: Allow cur/prev id to be str - change (pywikibot/core)
jenkins-bot has submitted this change and it was merged. Change subject: [FIX] PatrolEntry: Allow cur/prev id to be str .. [FIX] PatrolEntry: Allow cur/prev id to be str Sometimes PatrolEntry returns str instead of int for the revision ids. See also bug T101603. Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba --- M pywikibot/logentries.py 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 238f0b2..40dfb14 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -298,15 +298,17 @@ def current_id(self): Return the current id. # key has been changed in mw 1.19; try the new mw style first -return (self._params['curid'] -if 'curid' in self._params else self._params['cur']) +# sometimes it returns strs sometimes ints +return int(self._params['curid'] + if 'curid' in self._params else self._params['cur']) @property def previous_id(self): -# key has been changed in mw 1.19; try the new mw style first Return the previous id. -return (self._params['previd'] -if 'previd' in self._params else self._params['prev']) +# key has been changed in mw 1.19; try the new mw style first +# sometimes it returns strs sometimes ints +return int(self._params['previd'] + if 'previd' in self._params else self._params['prev']) @property def auto(self): -- To view, visit https://gerrit.wikimedia.org/r/216410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de Gerrit-Reviewer: John Vandenberg jay...@gmail.com Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] [FIX] PatrolEntry: Allow cur/prev id to be str - change (pywikibot/core)
XZise has uploaded a new change for review. https://gerrit.wikimedia.org/r/216410 Change subject: [FIX] PatrolEntry: Allow cur/prev id to be str .. [FIX] PatrolEntry: Allow cur/prev id to be str Sometimes PatrolEntry returns str instead of int for the revision ids. See also bug T101603. Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba --- M pywikibot/logentries.py 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/10/216410/1 diff --git a/pywikibot/logentries.py b/pywikibot/logentries.py index 238f0b2..40dfb14 100644 --- a/pywikibot/logentries.py +++ b/pywikibot/logentries.py @@ -298,15 +298,17 @@ def current_id(self): Return the current id. # key has been changed in mw 1.19; try the new mw style first -return (self._params['curid'] -if 'curid' in self._params else self._params['cur']) +# sometimes it returns strs sometimes ints +return int(self._params['curid'] + if 'curid' in self._params else self._params['cur']) @property def previous_id(self): -# key has been changed in mw 1.19; try the new mw style first Return the previous id. -return (self._params['previd'] -if 'previd' in self._params else self._params['prev']) +# key has been changed in mw 1.19; try the new mw style first +# sometimes it returns strs sometimes ints +return int(self._params['previd'] + if 'previd' in self._params else self._params['prev']) @property def auto(self): -- To view, visit https://gerrit.wikimedia.org/r/216410 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8febb1b23bb54bba0dcef11e4e887583b5c238ba Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: XZise commodorefabia...@gmx.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits