From 8ff1b544b7f28dc97048513bf6cb58953c1b7af9 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 12 Aug 2018 14:58:59 +0000 Subject: [PATCH] Fix exception on insert --- argondjbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/argondjbot.py b/argondjbot.py index 24f5469..d03ef31 100644 --- a/argondjbot.py +++ b/argondjbot.py @@ -142,7 +142,7 @@ class Playlist: position = len(self.waiting) self.waiting.append(element) return position - elif position >= 0: + elif before >= 0: self.waiting.insert(before, element) return before else: