scarletcafe / jishaku

A debugging and testing cog for discord.py rewrite bots.
https://jishaku.readthedocs.io/en/latest/
MIT License
543 stars 182 forks source link

Fix UnboundLocalError for bad sql queries #189

Closed z03h closed 2 years ago

z03h commented 2 years ago

Rationale

Using jsk sql commands with a query that would raise an error such as seelect 5 would raise 2 errors, one for the bad query and an UnboundLocalError for output.

Summary of changes made

start with output=None then check if it's still None after executing

Checklist