Ejemplo n.º 1
0
    def decorator(meth):
        if not table_argument:
            meth = lupa.unpacks_lua_table_method(meth)

        if sets_callback:
            meth = first_argument_from_storage(meth)

        meth = exceptions_as_return_values(can_raise(emits_lua_objects(meth)))
        meth._is_command = True
        meth._is_async = async
Ejemplo n.º 2
0
 def decorator(meth):
     if not table_argument:
         meth = lupa.unpacks_lua_table_method(meth)
     meth = exceptions_as_return_values(
         can_raise(
             emits_lua_objects(meth)
         )
     )
     meth._is_command = True
     meth._is_async = async
Ejemplo n.º 3
0
 def decorator(meth):
     meth = exceptions_as_return_values(
         can_raise(
             emits_lua_objects(
                 lupa.unpacks_lua_table_method(meth)
             )
         )
     )
     meth._is_command = True
     meth._is_async = async
Ejemplo n.º 4
0
    def decorator(meth):
        meth = detailed_exceptions()(meth)

        if not table_argument:
            meth = lupa.unpacks_lua_table_method(meth)

        if sets_callback:
            meth = first_argument_from_storage(meth)

        meth = exceptions_as_return_values(
            can_raise(
                emits_lua_objects(meth)
            )
        )
        meth._is_command = True
        meth._is_async = async
Ejemplo n.º 5
0
    def decorator(meth):
        # input arguments processing:
        # args | unpack_table | use_storage | decode
        if decode_arguments:
            meth = decodes_lua_arguments("utf8")(meth)

        if sets_callback:
            meth = first_argument_from_storage(meth)

        if not table_argument:
            meth = lupa.unpacks_lua_table_method(meth)

        # result processing:
        # result | enrich_exception | ex2retval | store_pyex | to_lua
        meth = detailed_exceptions()(meth)

        meth = exceptions_as_return_values(can_raise(emits_lua_objects(meth)))
        meth._is_command = True
        meth._is_async = async