| Conditions | 4 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| 1 | from plugin.api.core.exceptions import ApiError |
||
| 42 | def outer(func): |
||
| 43 | def inner(self, *args, **kwargs): |
||
| 44 | if authenticated and self.context.token is None: |
||
| 45 | raise AuthenticationRequiredError |
||
| 46 | |||
| 47 | return func(self, *args, **kwargs) |
||
| 48 | |||
| 49 | # Attach meta to wrapper |
||
| 50 | inner.__meta__ = { |
||
| 51 | 'authenticated': authenticated, |
||
| 52 | 'exposed': True |
||
| 53 | } |
||
| 54 | |||
| 55 | return inner |
||
| 56 | |||
| 58 |