Browse Source

Use UploadRobot directly from pywikibot.specialbots

Remove unneccessary import roundtrip via pywikibot/scripts/upload
develop
Jonathan Golder 6 years ago
parent
commit
776950d990
  1. 18
      euroexange/euroexange.py

18
euroexange/euroexange.py

@ -27,7 +27,6 @@ import subprocess
import email.utils import email.utils
import pywikibot import pywikibot
import upload
import jogobot 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 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() targetSite = pywikibot.Site()
bot = upload.UploadRobot( filepath, bot = pywikibot.specialbots.UploadRobot(
description=comment, filepath,
useFilename=filename, description=comment,
keepFilename=keepFilename, useFilename=filename,
verifyDescription=verifyDescription, keepFilename=keepFilename,
ignoreWarning=ignoreWarning, verifyDescription=verifyDescription,
targetSite = targetSite ignoreWarning=ignoreWarning,
) targetSite = targetSite
)
bot.upload_image(debug=True) bot.upload_image(debug=True)

Loading…
Cancel
Save