From 5faf5a0afdd07cca2bb64dd168e4349f83f30492 Mon Sep 17 00:00:00 2001 From: achbed Date: Mon, 1 Dec 2014 00:48:53 -0600 Subject: [PATCH] Fix for crashing after first track if played Signed-off-by: achbed --- deefuzzer/station.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/deefuzzer/station.py b/deefuzzer/station.py index 691c4f6..e9ac3e1 100644 --- a/deefuzzer/station.py +++ b/deefuzzer/station.py @@ -673,16 +673,19 @@ class Station(Thread): self.update_twitter(message) def channel_open(self): - if not self.channelIsOpen: - try: - self.channel.open() - self.channel_delay = self.channel.delay() - self._info('channel connected') - self.channelIsOpen = True - return True - except: - self.err('channel could not be opened') - return False + if self.channelIsOpen: + return True + + try: + self.channel.open() + self.channel_delay = self.channel.delay() + self._info('channel connected') + self.channelIsOpen = True + return True + except: + self.err('channel could not be opened') + + return False def channel_close(self): self.channelIsOpen = False -- 2.39.5