From bf408dc60f04c1ac471863f1e013eb4e5198c8cb Mon Sep 17 00:00:00 2001 From: phxntxm Date: Sun, 14 Aug 2016 00:46:58 -0500 Subject: [PATCH] Corrected error upon removing with no id passed --- cogs/strawpoll.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/strawpoll.py b/cogs/strawpoll.py index cb3b8be..d631f12 100644 --- a/cogs/strawpoll.py +++ b/cogs/strawpoll.py @@ -102,7 +102,7 @@ class Strawpoll: if poll_id: poll = server_polls.get(poll_id) if not poll: - fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls) + fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls.items()) await self.bot.say( "There is no poll setup with that ID! Here is a list of the current polls```\n{}```".format(fmt)) else: @@ -111,5 +111,5 @@ class Strawpoll: config.saveContent('strawpolls', all_polls) await self.bot.say("I have just removed the poll with the ID {}".format(poll_id)) else: - fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls) + fmt = "\n".join("{}: {}".format(data['title'], _poll_id) for _poll_id, data in server_polls.items()) await self.bot.say("Here is a list of the polls on this server:\n```\n{}```".format(fmt))