jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/563730 )

Change subject: [bugfix] Cleanup sysop usage
......................................................................

[bugfix] Cleanup sysop usage

config.sysopnames is deprecated since 6f0cafd

- remove its usage from flickrripper.py
- print deletion right instead of sysop right in followlive.py
- use sysop right instead of sysop account in nowcommons.py doc
- use delete right in redirect.py instead of logged_in(sysop=True)
  which never will be True

Change-Id: I948f1692eba5847ddbb6e36b062675029fe2ea7b
---
M scripts/flickrripper.py
M scripts/followlive.py
M scripts/nowcommons.py
M scripts/redirect.py
4 files changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 248050e..cd54e2c 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -20,7 +20,7 @@
 """
 #
 # (C) Multichill, 2009
-# (C) Pywikibot team, 2009-2019
+# (C) Pywikibot team, 2009-2020
 #
 # Distributed under the terms of the MIT license.
 #
@@ -438,9 +438,6 @@
     # Set the Flickr reviewer
     if config.flickr['reviewer']:
         reviewer = config.flickr['reviewer']
-    elif 'commons' in config.sysopnames['commons']:
-        pywikibot.output(config.sysopnames['commons'])
-        reviewer = config.sysopnames['commons']['commons']
     elif 'commons' in config.usernames['commons']:
         reviewer = config.usernames['commons']['commons']
     else:
diff --git a/scripts/followlive.py b/scripts/followlive.py
index 3105049..eb54db9 100644
--- a/scripts/followlive.py
+++ b/scripts/followlive.py
@@ -15,7 +15,7 @@
 &params;
 """
 #
-# (C) Pywikibot team, 2005-2019
+# (C) Pywikibot team, 2005-2020
 #
 # Distributed under the terms of the MIT license.
 #
@@ -390,7 +390,7 @@

 b) blank page
 e) edit page
-d) delete page (need sysop right)
+d) delete page (needs deletion right)
 q) quit cleaningbot
 Enter) OK
 What is it? """
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index 1940081..11091d8 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -10,7 +10,7 @@
 the source wiki. If multiple versions of the file exist, the script will not
 delete. If the SHA1 comparison is not equal, the script will not delete.

-A sysop account on the local wiki is required if you want all features of
+A sysop rights on the local wiki is required if you want all features of
 this script to work properly.

 This script understands various command-line arguments:
@@ -31,7 +31,7 @@
                     file, including where it is used as a template parameter
                     or in galleries. However, it can also make more mistakes.

-    -replaceonly    Use this if you do not have a local sysop account, but do
+    -replaceonly    Use this if you do not have a local sysop rights, but do
                     wish to replace links from the NowCommons template.

 Example
@@ -49,8 +49,8 @@
 #
 # (C) Wikipedian, 2006-2007
 # (C) Siebrand Mazeland, 2007-2008
-# (C) xqt, 2010-2019
-# (C) Pywikibot team, 2006-2019
+# (C) xqt, 2010-2020
+# (C) Pywikibot team, 2006-2020
 #
 # Distributed under the terms of the MIT license.
 #
diff --git a/scripts/redirect.py b/scripts/redirect.py
index 2f11609..7f576f8 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -72,8 +72,8 @@
 #
 # (C) Daniel Herding, 2004
 # (C) Purodha Blissenbach, 2009
-# (C) xqt, 2009-2019
-# (C) Pywikibot team, 2004-2019
+# (C) xqt, 2009-2020
+# (C) Pywikibot team, 2004-2020
 #
 # Distributed under the terms of the MIT license.
 #
@@ -427,7 +427,8 @@
         @return: A valid speedy deletion template.
         @rtype: str or None
         """
-        if self.getOption('delete') and not self.site.logged_in(sysop=True):
+        if self.getOption('delete') \
+           and 'delete' not in self.site.userinfo['rights']:
             sd = self.getOption('sdtemplate')
             if not sd and i18n.twhas_key(self.site,
                                          'redirect-broken-redirect-template'):

--
To view, visit https://gerrit.wikimedia.org/r/563730
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I948f1692eba5847ddbb6e36b062675029fe2ea7b
Gerrit-Change-Number: 563730
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Dvorapa <[email protected]>
Gerrit-Reviewer: Huji <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to