Fixed irc bot list append with no file opened

This commit is contained in:
Uriziel 2013-01-25 00:46:44 +01:00
parent e9427bff50
commit 248caf84c0

View File

@ -328,7 +328,10 @@ class SyncFactory(Factory):
with self._roomUpdate:
if room in self._rooms:
for user in self._rooms[room].itervalues():
l.append({'nick': user.name, 'file': user.file['name'], "length": user.file['duration']})
if(user.file):
l.append({'nick': user.name, 'file': user.file['name'], "length": user.file['duration']})
else:
l.append({'nick': user.name, 'file': None, "length": None})
return l
def isRoomPaused(self, room):