Return controller class instance and controller method callbacle for the provided operation id. :rtype: ``tuple``
(op_id)
| 57 | |
| 58 | |
| 59 | def op_resolver(op_id): |
| 60 | """ |
| 61 | Return controller class instance and controller method callbacle for the provided operation id. |
| 62 | |
| 63 | :rtype: ``tuple`` |
| 64 | """ |
| 65 | module_name, func_name = op_id.split(":", 1) |
| 66 | controller_name = func_name.split(".")[0] |
| 67 | |
| 68 | __import__(module_name) |
| 69 | module = sys.modules[module_name] |
| 70 | |
| 71 | controller_instance = getattr(module, controller_name) |
| 72 | method_callable = functools.reduce(getattr, func_name.split("."), module) |
| 73 | |
| 74 | return controller_instance, method_callable |
| 75 | |
| 76 | |
| 77 | def abort(status_code=exc.HTTPInternalServerError.code, message="Unhandled exception"): |
no outgoing calls
no test coverage detected