jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/584555 )
Change subject: [cleanup] replace deprecated sysopnames in imagetransfer.py ......................................................................
[cleanup] replace deprecated sysopnames in imagetransfer.py
Bug: T71283 Change-Id: I6f64445a4c6e5a73c6ad6e0f117ac88278416e7a --- M pywikibot/config2.py M scripts/imagetransfer.py 2 files changed, 2 insertions(+), 4 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/config2.py b/pywikibot/config2.py index 98c489c..0d08bcc 100644 --- a/pywikibot/config2.py +++ b/pywikibot/config2.py @@ -898,7 +898,7 @@ # This section contains configuration options that are no longer in use. # They are kept here to prevent warnings about undefined parameters.
-sysopnames = collections.defaultdict(dict) +# No obsolete settings currently
# #############################################
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py index 2c34142..ac72587 100755 --- a/scripts/imagetransfer.py +++ b/scripts/imagetransfer.py @@ -197,9 +197,7 @@ reason = i18n.twtranslate(sourceSite, 'imagetransfer-nowcommons_notice') # try to delete the original image if we have a sysop account - if sourceSite.family.name in config.sysopnames \ - and sourceSite.lang in \ - config.sysopnames[sourceSite.family.name]: + if sourceSite.has_right('delete'): if sourceImagePage.delete(reason): return if sourceSite.lang in nowCommonsTemplate \