Use UploadRobot directly from pywikibot.specialbots

Remove unneccessary import roundtrip via pywikibot/scripts/upload
This commit is contained in:
2018-09-24 20:24:27 +02:00
parent 93827e9f3b
commit 776950d990

View File

@@ -27,7 +27,6 @@ import subprocess
import email.utils
import pywikibot
import upload
import jogobot
@@ -252,7 +251,8 @@ class EuroExangeBot( pywikibot.bot.BaseBot ):
ignoreWarning=False #set to True to skip warnings, Upload even if another file would be overwritten or another mistake would be risked
targetSite = pywikibot.Site()
bot = upload.UploadRobot( filepath,
bot = pywikibot.specialbots.UploadRobot(
filepath,
description=comment,
useFilename=filename,
keepFilename=keepFilename,