#NEWLINE# def get_backend_details( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# scratchpad = json . loads ( self . backend_register ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# return ( None , None , None , None ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# exponent = scratchpad [ 'exponent' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# exponent = None #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# last_success_time = scratchpad [ 'last_success' ] #NEWLINE# dt = datetime . datetime . fromtimestamp ( last_success_time ) #NEWLINE# last_success = dt . strftime ( '%Y-%m-%d %H:%M' ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# last_success = None #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# failures = scratchpad [ 'failures' ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# failures = None #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# last_failure_time = scratchpad [ 'last_failure' ] #NEWLINE# dt = datetime . datetime . fromtimestamp ( last_failure_time ) #NEWLINE# last_failure = dt . strftime ( '%Y-%m-%d %H:%M' ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# last_failure = None #NEWLINE# #UNINDENT# return ( exponent , last_failure , last_failure , failures )