def _call_play(self, ms_id, args):
        ns = self._nsmgr.get_stream(ms_id)
        if not ns:
            raise PlayFailed('invalid stream %r' % (ms_id,))

        def translate_not_found_eb(failure):
            # should this be onStatus or _error? :/
            failure.trap(errors.NotFoundError)
            raise PlayNotFound(str(failure.value))

        def play_cb(result):
            log.debug('play handler done')
            return result

        d = defer.maybeDeferred(self._app.play, ns, *args[1:])
        d.addCallbacks(play_cb, translate_not_found_eb)
        return d
dataset/ETHPy150Open arkadini/twimp/twimp/server/appserver.py/AppDispatchServerProtocol._call_play/original