Ejemplo n.º 1
0
        def eb(fail):
            code = getattr(fail.value, 'code', 'NetStream.Play.Failed')
            description = util.getFailureMessage(fail) or 'Internal Server Error'

            self.sendStatus(status.error(code, description))

            return fail
Ejemplo n.º 2
0
        def eb(fail):
            code = getattr(fail.value, 'code', 'NetStream.Play.Failed')
            description = util.getFailureMessage(fail) or 'Internal Server Error'

            self.sendStatus(status.error(code, description))

            return fail
Ejemplo n.º 3
0
        def send_status(result):
            s = None

            if isinstance(result, failure.Failure):
                code = getattr(result.value, 'code', 'NetConnection.Call.Failed')
                description = util.getFailureMessage(result) or 'Internal Server Error'

                s = status.error(code, description)
            else:
                s = status.status('NetStream.Publish.Start',
                    description='%s is now published.' % (name,),
                    clientid=self.client.id)

            self.sendStatus(s)

            return result
Ejemplo n.º 4
0
        def send_status(result):
            s = None

            if isinstance(result, failure.Failure):
                code = getattr(result.value, 'code', 'NetConnection.Call.Failed')
                description = util.getFailureMessage(result) or 'Internal Server Error'

                s = status.error(code, description)
            else:
                s = status.status('NetStream.Publish.Start',
                    description='%s is now published.' % (name,),
                    clientid=self.client.id)

            self.sendStatus(s)

            return result
Ejemplo n.º 5
0
        def eb(fail):
            fail.trap(exc.CallFailed)

            self.assertEqual(util.getFailureMessage(fail),
                "Method not found (дак)")
Ejemplo n.º 6
0
        def eb(fail):
            fail.trap(exc.CallFailed)

            self.assertEqual(util.getFailureMessage(fail),
                             "Method not found (дак)")