jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[IMPR] Improvements for data_ingestion.py

Change-Id: I693de8876582565a0e63349cebb3bc1f9c276c85
---
M scripts/data_ingestion.py
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py
index f8b27cb..28c75ae 100755
--- a/scripts/data_ingestion.py
+++ b/scripts/data_ingestion.py
@@ -269,16 +269,16 @@

templates = configuration_page.templatesWithParams()
for (template, params) in templates:
- if template.title(with_ns=False) == 'Data ingestion':
- for param in params:
- field, _, value = param.partition('=')
+ if template.title(with_ns=False) != 'Data ingestion':
+ continue

- # Remove leading or trailing spaces
- field = field.strip()
- value = value.strip()
- if not value:
- value = None
- configuration[field] = value
+ for param in params:
+ field, _, value = param.partition('=')
+
+ # Remove leading or trailing spaces
+ field = field.strip()
+ value = value.strip() or None
+ configuration[field] = value

return configuration


To view, visit change 767801. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I693de8876582565a0e63349cebb3bc1f9c276c85
Gerrit-Change-Number: 767801
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged