#NEWLINE# def _readV2DirsFromCacheFile( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# with open ( MICRO_CONSENSUS_CACHE_FILE , 'rb' ) as f : #NEWLINE# #INDENT# data = f . read ( ) #NEWLINE# #UNINDENT# consensus = NetworkStatusDocumentV3 ( data ) #NEWLINE# return getV2DirsFromConsensus ( msg ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# msg = 'Failed to read cached-consensus-microdesc. Reason: {}.' . format ( e ) #NEWLINE# logging . debug ( msg ) #NEWLINE# return None