jenkins-bot has submitted this change and it was merged.

Change subject: Bug 73024 - replace getHash() with getFileSHA1Sum()
......................................................................


Bug 73024 - replace getHash() with getFileSHA1Sum()

Instance of 'FilePage' has no 'getHash' member.
Use FilePage.getFileSHA1Sum().

Bug: 73024

Change-Id: Id4e13e57f46c9dd088bea0b80eea374fab959f2f
---
M scripts/checkimages.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 8179fff..005d526 100644
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -940,7 +940,7 @@
         commons_site = pywikibot.Site('commons', 'commons')
         regexOnCommons = r"\[\[:File:%s\]\] is also on '''Commons''': 
\[\[commons:File:.*?\]\](?: \(same name\)|)$" \
                          % re.escape(self.imageName)
-        hash_found = self.image.getHash()
+        hash_found = self.image.getFileSHA1Sum()
         if not hash_found:
             return  # Image deleted, no hash found. Skip the image.
 
@@ -1002,7 +1002,7 @@
         duplicateRegex = r'\[\[:File:%s\]\] has the following duplicates' \
                          % re.escape(self.convert_to_url(self.imageName))
         imagePage = pywikibot.FilePage(self.site, self.imageName)
-        hash_found = imagePage.getHash()
+        hash_found = imagePage.getFileSHA1Sum()
         duplicates = self.site.getFilesFromAnHash(hash_found)
 
         if not duplicates:

-- 
To view, visit https://gerrit.wikimedia.org/r/171730
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4e13e57f46c9dd088bea0b80eea374fab959f2f
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <[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

Reply via email to