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 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)

Loading…
Cancel
Save