jenkins-bot has submitted this change and it was merged.
Change subject: [bugfix] return source._link if source is a Page object
......................................................................
[bugfix] return source._link if source is a Page object
Bug:T103480
Change-Id: I93fab476fc58e99631359bf30908eb6a2bdb803d
---
M pywikibot/textlib.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index dac5aeb..cffc04c 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -489,7 +489,7 @@
def to_link(source):
"""Return the link from source when it's a Page otherwise itself."""
if isinstance(source, pywikibot.Page):
- return pywikibot.Page._link
+ return source._link
elif isinstance(source, basestring):
return pywikibot.Link(source, site)
else:
--
To view, visit https://gerrit.wikimedia.org/r/220089
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I93fab476fc58e99631359bf30908eb6a2bdb803d
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits