Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/831188 )
Change subject: [IMPR] create label dict directly in create_isbn_edition.py ......................................................................
[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(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
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()
pywikibot-commits@lists.wikimedia.org