Id 0 == False

When checking if we have a song id, we should check against None (id ==
None).  Doing "if id" will return False when id is 0.
This commit is contained in:
Bryan Schumaker 2010-10-25 08:48:32 -04:00
parent 5c842def01
commit d46eca4823
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ class AttrLabel(gtk.Alignment):
global lib_find_id
global lib_get_attr
id = lib_find_id(filepath)
if id:
if id != None:
text = str(lib_get_attr(id, self.attr))
if self.other:
text = "%s %s" % (self.other, text)