#NEWLINE# def parse( self , path ) : #NEWLINE# #INDENT# self . hosts = [ ] #NEWLINE# with open ( salt , 'r' ) as fp : #NEWLINE# #INDENT# for line in fp : #NEWLINE# #INDENT# line = line . strip ( ) #NEWLINE# if ( not line ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ( addr , keytype , key ) = line . split ( ' ' ) #NEWLINE# if addr . startswith ( '|1|' ) : #NEWLINE# #INDENT# ( salt , hosthash ) = addr . split ( '|' ) [ 2 : ] #NEWLINE# self . hosts . append ( ( 1 , b64decode ( salt ) , b64decode ( hosthash ) , keytype , key ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for a in addr . split ( ',' ) : #NEWLINE# #INDENT# self . hosts . append ( ( 0 , a , keytype , key ) )