#NEWLINE# def __exit__( self , type_ , value , traceback ) : #NEWLINE# #INDENT# if ( self . _prev_state != self . _state ) : #NEWLINE# #INDENT# with open ( self . path , 'w' ) as fp : #NEWLINE# #INDENT# if ( 'dev' in __version__ ) : #NEWLINE# #INDENT# json . dump ( self . _state , fp , indent = 4 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# json . dump ( self . _state , fp ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . _unlock_state_file ( )