nicer code

This commit is contained in:
Yann Leboulanger 2010-08-26 13:52:53 +02:00
parent 38dce6e2c1
commit 164a3891ba
1 changed files with 1 additions and 4 deletions

View File

@ -247,10 +247,7 @@ class JingleSession(object):
"""
Return True when all codecs and candidates are ready (for all contents)
"""
for c in self.contents.itervalues():
if c.is_ready():
return True
return (all((content.is_ready() for content in self.contents.itervalues()))
return (any((content.is_ready() for content in self.contents.itervalues()))
and self.accepted)
def accept_session(self):