]> git.ipfire.org Git - ipfire.org.git/commitdiff
talk: Return channels as a list
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Oct 2018 14:52:20 +0000 (15:52 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 10 Oct 2018 14:52:20 +0000 (15:52 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/talk.py

index 53ec41068a0eae956dd6dea611f5829798e541e8..5103ab380529ba2c46620bb8c9d5ba3e8625e354 100644 (file)
@@ -40,8 +40,13 @@ class Freeswitch(Object):
                                (direction = %s AND callee_num = %s) ORDER BY created_epoch",
                        "inbound", account.sip_id, "outbound", account.sip_id)
 
+               channels = []
+
                for row in res:
-                       yield Channel(self, data=row)
+                       c = Channel(self, data=row)
+                       channels.append(c)
+
+               return channels
 
 
 class SIPRegistration(object):