Xqt submitted this change.
[IMPR] create label dict directly in create_isbn_edition.py
Change-Id: Ib10eaf220a6900dd5080dca4faf21be5519ebd1e
---
M scripts/create_isbn_edition.py
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/create_isbn_edition.py b/scripts/create_isbn_edition.py
index 99d45ee..64968f8 100644
--- a/scripts/create_isbn_edition.py
+++ b/scripts/create_isbn_edition.py
@@ -464,8 +464,7 @@
if rescnt == 1:
item.get(get_redirect=True) # Update item
elif not rescnt:
- label = {}
- label[booklang] = objectname
+ label = {booklang: objectname}
item = pywikibot.ItemPage(repo) # Create item
item.editEntity({'labels': label}, summary=transcmt)
qnumber = item.getID()
To view, visit change 831188. To unsubscribe, or for help writing mail filters, visit settings.