ValueError when self.GetTrackAttr('__length') is 'None' in xldbus.py

Reported by ragnarok2040 on 2010-07-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Exaile
Medium
Unassigned

Bug Description

I was getting a ValueError when using the command 'exaile -q' while listening to some shoutcast streams using Exaile v0.3.2.0.

It seems GetTrackAttr('__length') was returning 'None', which results in a ValueError since a string literal is being cast to a float in line 389 of xl/xldbus.py.

This seems to work pretty well and should work if other string literals are returned. I would make a proper patch, but I don't have a clean source to diff against.

Line 389 of xl/xldbus.py:
        try:
                length = float(self.GetTrackAttr('__length'))
                length = '%d:%02d' % (length // 60, length %60)
        except ValueError:
                length = self.GetTrackAttr('__length')

Related branches

Aren Olson (reacocard) wrote :

fixed trunk/3644 and 0.3.2.x/3438, thanks!

Changed in exaile:
importance: Undecided → Medium
milestone: none → 0.3.2.1
status: New → Fix Committed
Aren Olson (reacocard) on 2011-02-13
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers