Rename FailedApplication to JingleContentSetupException

This commit is contained in:
Thibaut GIRKA 2009-12-01 22:39:02 +01:00
parent f128391189
commit afaa90f91d
3 changed files with 5 additions and 5 deletions

View File

@ -23,7 +23,7 @@ def get_jingle_content(node):
return contents[namespace](node)
class FailedApplication(Exception):
class JingleContentSetupException(Exception):
"""
Exception that should be raised when a content fails to setup.
"""

View File

@ -24,7 +24,7 @@ from glib import GError
import gajim
from jingle_transport import JingleTransportICEUDP
from jingle_content import contents, JingleContent, FailedApplication
from jingle_content import contents, JingleContent, JingleContentSetupException
class JingleRTPContent(JingleContent):
@ -98,7 +98,7 @@ class JingleRTPContent(JingleContent):
(_("%s configuration error") % text.capitalize(),
_("Couldn't setup %s. Check your configuration.\n\nError was:\n%s")
% (text, error_str)))
raise FailedApplication
raise JingleContentSetupException
def add_remote_candidates(self, candidates):
JingleContent.add_remote_candidates(self, candidates)

View File

@ -29,7 +29,7 @@ Handles Jingle sessions (XEP 0166)
import gajim #Get rid of that?
import xmpp
from jingle_transport import get_jingle_transport
from jingle_content import get_jingle_content, FailedApplication
from jingle_content import get_jingle_content, JingleContentSetupException
# FIXME: Move it to JingleSession.States?
class JingleStates(object):
@ -492,7 +492,7 @@ class JingleSession(object):
else:
reasons.add('unsupported-transports')
contents_rejected.append((element['name'], 'peer'))
except FailedApplication:
except JingleContentSetupException:
reasons.add('failed-application')
else:
contents_rejected.append((element['name'], 'peer'))