Call an object from sandboxed code.
(__self, __context, __obj, *args, **kwargs)
| 415 | return type(s)(rv) |
| 416 | |
| 417 | def call(__self, __context, __obj, *args, **kwargs): |
| 418 | """Call an object from sandboxed code.""" |
| 419 | fmt = inspect_format_method(__obj) |
| 420 | if fmt is not None: |
| 421 | return __self.format_string(fmt, args, kwargs) |
| 422 | |
| 423 | # the double prefixes are to avoid double keyword argument |
| 424 | # errors when proxying the call. |
| 425 | if not __self.is_safe_callable(__obj): |
| 426 | raise SecurityError('%r is not safely callable' % (__obj,)) |
| 427 | return __context.call(__obj, *args, **kwargs) |
| 428 | |
| 429 | |
| 430 | class ImmutableSandboxedEnvironment(SandboxedEnvironment): |
nothing calls this directly
no test coverage detected