#NEWLINE# def check_env_cache( opts , env_cache ) : #NEWLINE# #INDENT# '\n    Returns cached env names, if present. Otherwise returns None.\n    ' #NEWLINE# if ( not os . path . isfile ( env_cache ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# with salt . utils . fopen ( env_cache , 'rb' ) as fp_ : #NEWLINE# #INDENT# log . trace ( 'Returning env cache data from {0}' . format ( env_cache ) ) #NEWLINE# serial = salt . payload . Serial ( opts ) #NEWLINE# return serial . load ( fp_ ) #NEWLINE# #UNINDENT# #UNINDENT# except ( IOError , OSError ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return None