jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/808289 )

Change subject: [IMPR] PEP8 updates
......................................................................

[IMPR] PEP8 updates

Bug: T305859
Change-Id: Iedf5eac852c2db1e3774b8915720568e1b0927d9
---
M scripts/dataextend.py
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/scripts/dataextend.py b/scripts/dataextend.py
index a2c42c4..8c8135b 100644
--- a/scripts/dataextend.py
+++ b/scripts/dataextend.py
@@ -2604,6 +2604,8 @@
         result = self.findbyre(r'>{}\|([^<>]+)'.format(name), html)
         if result:
             return result.replace(' ', '')
+        else:
+            return None

     def findlanguagenames(self, html):
         languagenames = set()
@@ -2636,11 +2638,15 @@
         section = 
self.findbyre(r'<ns1:nationalityOfEntity>(.*?)</ns1:nationalityOfEntity>', html)
         if section:
             return self.findallbyre(r'<ns1:text>([^<>]+)</ns1:text>', section, 
'country')
+        else:
+            return None

     def findlanguagesspoken(self, html):
         section = 
self.findbyre(r'<ns1:languageOfEntity>(.*?)</ns1:languageOfEntity>', html)
         if section:
             return self.findallbyre(r'<ns1:text>([^<>]+)</ns1:text>', section, 
'language')
+        else:
+            return None

     def findoccupations(self, html):
         sections = self.findallbyre(r'<ns1:occupation>(.*?)</ns1:occupation>', 
html)

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/808289
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: Iedf5eac852c2db1e3774b8915720568e1b0927d9
Gerrit-Change-Number: 808289
Gerrit-PatchSet: 1
Gerrit-Owner: Vivian Rook <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to