| Total Complexity | 1 | 
| Total Lines | 18 | 
| Duplicated Lines | 0 % | 
| 1 | #!/usr/bin/env python  | 
            ||
| 22 | class Ping(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 ping failure.  | 
            ||
| 31 | """  | 
            ||
| 32 | |||
| 33 | try:  | 
            ||
| 34 | data = self.duo_auth.ping()  | 
            ||
| 35 | except RuntimeError, e:  | 
            ||
| 36 | print "Ping failed! %s" % e  | 
            ||
| 37 |             raise ValueError("Ping failed! %s" % e) | 
            ||
| 38 | else:  | 
            ||
| 39 | return data  | 
            ||
| 40 |