From d512a6e879ab3c9017d2351d7061ad7cd23fa7bd Mon Sep 17 00:00:00 2001 From: Dylan Dizon Date: Tue, 6 Nov 2018 13:24:31 -0500 Subject: [PATCH] Fix exception reference in on_error event --- src/run.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/run.py b/src/run.py index f020b14..af9d20c 100644 --- a/src/run.py +++ b/src/run.py @@ -136,7 +136,7 @@ async def on_message(message): @bot.event async def on_error(error, *args, **kwargs): - print('\n! ! ! ! !\nE R R O R : {}\n! ! ! ! !\n'.format(error), file=sys.stderr) + print('\n! ! ! ! !\nE R R O R : {}\n! ! ! ! !\n'.format(sys.exc_info()[1].text), file=sys.stderr) tb.print_exc() await bot.get_user(u.config['owner_id']).send('**ERROR** \N{WARNING SIGN}\n```\n{}```'.format(error)) await bot.get_channel(u.config['info_channel']).send('**ERROR** \N{WARNING SIGN}\n```\n{}```'.format(error)) @@ -235,8 +235,8 @@ async def test(ctx): if post['tags']: temptags = post['tags'].split(' ') cis = [] - for tag in suggested: - pass + # for tag in suggested: + # pass for tag in temptags: tags.append(f'[{tag}](https://e621.net/post?tags={tag})') # tags = ' '.join(tags)