Browse Source

For testing on betawiki, prepend prefix to filename

As otherwise we will overwrite original files on commons
develop
Jonathan Golder 4 years ago
parent
commit
6c5eff65fb
  1. 5
      euroexange/euroexange.py

5
euroexange/euroexange.py

@ -44,6 +44,11 @@ class EuroExangeBotJob():
self.script = kwargs['script']
self.freq = kwargs['freq']
# On beta prepend string TEST_ to filename to prevent overwriting of
# originial commons files
if pywikibot.Site().family.name == "wpbeta":
self.image = "TEST_{}".format(self.image)
class EuroExangeBot( pywikibot.bot.BaseBot ):

Loading…
Cancel
Save