#NEWLINE# def parse_sources_file( filepath ) : #NEWLINE# #INDENT# '\n    Parse file on disk\n\n    :returns: List of data sources, [:class:`DataSource`]\n    :raises: :exc:`InvalidData` If any error occurs reading\n        file, so an I/O error, non-existent file, or invalid format.\n    ' #NEWLINE# try : #NEWLINE# #INDENT# with open ( filepath , 'r' ) as f : #NEWLINE# #INDENT# return parse_sources_data ( f . read ( ) , origin = filepath ) #NEWLINE# #UNINDENT# #UNINDENT# except IOError as e : #NEWLINE# #INDENT# raise InvalidData ( ( 'I/O error reading sources file: %s' % str ( e ) ) , origin = e )