| Total Complexity | 2 |
| Total Lines | 11 |
| Duplicated Lines | 0 % |
| 1 | from st2actions.runners.pythonrunner import Action |
||
| 7 | class LibratoBaseAction(Action): |
||
| 8 | def __init__(self, config): |
||
| 9 | super(LibratoBaseAction, self).__init__(config) |
||
| 10 | self.librato = self._get_client() |
||
| 11 | |||
| 12 | def _get_client(self): |
||
| 13 | user = self.config['user'] |
||
| 14 | token = self.config['token'] |
||
| 15 | |||
| 16 | client = librato.connect(user, token) |
||
| 17 | return client |
||
| 18 |