XZise has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/159947

Change subject: [FIX] Tokens: Fix getting tokens with the new scheme
......................................................................

[FIX] Tokens: Fix getting tokens with the new scheme

Change-Id: I5b79d02edaf19724ec9c8857f33c57683edb9da6
---
M pywikibot/site.py
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/47/159947/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 1a16e06..6e41cc2 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2281,13 +2281,13 @@
                                    type='|'.join(types)).submit()
             else:
                 # TODO: Fetch that from the API with paraminfo
-                special_names = set('deleteglobalaccount', 'patrol', 
'rollback',
-                                    'setglobalaccountstatus', 'userrights',
-                                    'watch')
+                special_names = set(['deleteglobalaccount', 'patrol', 
'rollback',
+                                     'setglobalaccountstatus', 'userrights',
+                                     'watch'])
                 new_tokens = [token if token in special_names else 'csrf'
                               for token in types]
-                data = api.Request(action='query',
-                                   tokens='|'.join(new_tokens)).submit()
+                data = api.Request(action='query', meta='tokens',
+                                   type='|'.join(new_tokens)).submit()
                 if 'query' in data:
                     data = data['query']
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b79d02edaf19724ec9c8857f33c57683edb9da6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to