]> kaliko git repositories - mpd-sima.git/commitdiff
Attempt to fix AttributeError issue fix-AttributeError
authorkaliko <kaliko@azylum.org>
Wed, 21 Jan 2015 19:58:39 +0000 (20:58 +0100)
committerkaliko <kaliko@azylum.org>
Thu, 22 Jan 2015 13:54:49 +0000 (14:54 +0100)
sima/client.py

index 667242cc7ab569a4cb94792e26550a8de4e5526c..06ba8961e8a6bcb305fbafd3912986bcd366efaa 100644 (file)
@@ -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):
         """