Use UploadRobot directly from pywikibot.specialbots
Remove unneccessary import roundtrip via pywikibot/scripts/upload
This commit is contained in:
@@ -27,7 +27,6 @@ import subprocess
|
||||
import email.utils
|
||||
|
||||
import pywikibot
|
||||
import upload
|
||||
|
||||
import jogobot
|
||||
|
||||
@@ -252,14 +251,15 @@ 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,
|
||||
description=comment,
|
||||
useFilename=filename,
|
||||
keepFilename=keepFilename,
|
||||
verifyDescription=verifyDescription,
|
||||
ignoreWarning=ignoreWarning,
|
||||
targetSite = targetSite
|
||||
)
|
||||
bot = pywikibot.specialbots.UploadRobot(
|
||||
filepath,
|
||||
description=comment,
|
||||
useFilename=filename,
|
||||
keepFilename=keepFilename,
|
||||
verifyDescription=verifyDescription,
|
||||
ignoreWarning=ignoreWarning,
|
||||
targetSite = targetSite
|
||||
)
|
||||
|
||||
bot.upload_image(debug=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user