From de1f9e238dfdc3949b67a95af82fcc18e6ebe8dd Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Mon, 3 Oct 2016 22:19:11 +0100 Subject: [PATCH] Avoid TypeError. --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index ebf8762..d9d25b2 100755 --- a/bot.py +++ b/bot.py @@ -805,7 +805,8 @@ def on_ready(): elif state['avatar'] != db.ONLINE_AVATAR: log.info('Restoring online avatar.') yield from set_avatar(db.ONLINE_AVATAR) - last_spoke.value = state['last_spoke'] + if state['last_spoke']: + last_spoke.value = state['last_spoke'] log.info('Logged in as {}#{}'.format(client.user.name, client.user.id)) feeds = get_bot_variable('feeds', []) orders = get_bot_variable('orders', []) -- 2.7.4