For testing on betawiki, prepend prefix to filename
As otherwise we will overwrite original files on commons
This commit is contained in:
@@ -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 ):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user