Commits

Anonymous committed 4717a10

prevent crash if at/len is not between 0 and 100 for whatever reason

Comments (0)

Files changed (1)

             at, len = [float(c) for c in self.status.time.split(':')]
             try:
                 self.progressbar.set_fraction(at/len)
-            except ZeroDivisionError:
+            except:
                 self.progressbar.set_fraction(0)
         else:
             self.progressbar.set_fraction(0)
                 try:
                     time = convert_time(int(self.songinfo.time))
                     self.progressbar.set_text(at_time + " / " + time)
-                except AttributeError:
+                except:
                     self.progressbar.set_text(at_time)
             else:
                 self.progressbar.set_text('')