Total Complexity | 1 |
Total Lines | 18 |
Duplicated Lines | 0 % |
1 | #!/usr/bin/env python |
||
22 | class Check(AuthAction): |
||
23 | def run(self): |
||
24 | """ |
||
25 | Ping the Duo Platorm. |
||
26 | |||
27 | Returns: An dict with info returned by Duo. |
||
28 | |||
29 | Raises: |
||
30 | RuntimeError: On Invalid keys. |
||
31 | """ |
||
32 | |||
33 | try: |
||
34 | data = self.duo_auth.check() |
||
35 | except RuntimeError, e: |
||
36 | print e |
||
37 | raise RuntimeError("Check failed! '%s'" % e) |
||
38 | else: |
||
39 | return data |
||
40 |