Total Complexity | 2 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from lib.mmonit import MmonitBaseAction |
||
4 | class MmonitGetEvent(MmonitBaseAction): |
||
5 | def run(self, event_id): |
||
6 | self.login() |
||
7 | data = {"id": event_id} |
||
8 | req = self.session.get("{}/reports/events/get".format(self.url), params=data) |
||
9 | |||
10 | try: |
||
11 | return req.json() |
||
12 | except Exception: |
||
13 | raise |
||
14 | finally: |
||
15 | self.logout() |
||
16 |