Make sure edit summary starts with bot

Due to bot policy all edit summaries of bot edits have to start with
"Bot:"

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=92 FS#92]
This commit is contained in:
2016-08-30 11:48:07 +02:00
parent 59d4d23c83
commit 20b811bc2a

View File

@@ -134,7 +134,11 @@ class MarkPagesBot( CurrentPageBot ): # sets 'current_page' on each treat()
# Define edit summary
summary = jogobot.config["red.markpages"]["mark_done_summary"].format(
reddisc=self.current_page.redfam.get_disc_link() )
reddisc=self.current_page.redfam.get_disc_link() ).strip()
# Make sure summary starts with "Bot:"
if not summary[:len("Bot:")] == "Bot:":
summary = "Bot: " + summary.strip()
# Save
self.put_current( self.new_text, summary=summary )