Prevent flush from creating cursor without con

MysqlRed.flush() tried to create a cursor in any case. If there was no
connection (because the subclasses haven't been instantiated an oursql
Error occured.
Instead, check before if there is a connection and otherwise raise an Error

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=75 FS#75]

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=75 FS#75]
This commit is contained in:
2016-08-24 15:48:30 +02:00
parent ee8ebbc8bc
commit bd2d221c48
2 changed files with 18 additions and 1 deletions

View File

@@ -123,7 +123,7 @@ class DiscussionParserBot(
reddisc=red_page.page.title() ) )
else:
jogobot.output(
"\03{red} Page [[{reddisc}]], ".format(
"\03{red}" + "Page [[{reddisc}]], ".format(
reddisc=red_page.page.title() ) +
"containing no redfam, parsed!",
"WARNING" )