From: kaliko Date: Wed, 21 Jan 2015 19:58:39 +0000 (+0100) Subject: Attempt to fix AttributeError issue X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=refs%2Fheads%2Ffix-AttributeError;p=mpd-sima.git Attempt to fix AttributeError issue --- diff --git a/sima/client.py b/sima/client.py index 667242c..06ba896 100644 --- a/sima/client.py +++ b/sima/client.py @@ -144,11 +144,12 @@ class PlayerClient(Player): return ans def __skipped_track(self, old_curr): + curr = self.current if (self.state == 'stop' or not hasattr(old_curr, 'id') - or not hasattr(self.current, 'id')): + or not hasattr(curr, 'id')): return False - return self.current.id != old_curr.id # pylint: disable=no-member + return curr.id != old_curr.id # pylint: disable=no-member def _flush_cache(self): """