#NEWLINE# @ classmethod #NEWLINE# def crawl_local( cls , link ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# dirents = os . listdir ( link . local_path ) #NEWLINE# #UNINDENT# except OSError as e : #NEWLINE# #INDENT# TRACER . log ( ( 'Failed to read %s: %s' % ( link . local_path , e ) ) , V = 1 ) #NEWLINE# return ( set ( ) , set ( ) ) #NEWLINE# #UNINDENT# ( files , dirs ) = partition ( [ os . path . join ( link . local_path , fn ) for fn in dirents ] , os . path . isdir ) #NEWLINE# return ( set ( map ( Link . from_filename , files ) ) , set ( map ( Link . from_filename , dirs ) ) )