#NEWLINE# def check_token( self , token ) : #NEWLINE# #INDENT# 'Check to see if a token has expired' #NEWLINE# if ( not hasattr ( token , 'timestamp' ) ) : #NEWLINE# #INDENT# raise AttributeError ( "token doesn't have a timestamp attribute" ) #NEWLINE# #UNINDENT# if ( ( int ( token . timestamp ) + 3600 ) < time . time ( ) ) : #NEWLINE# #INDENT# token = self . refresh_token ( token ) #NEWLINE# #UNINDENT# return self