#NEWLINE# @ staticmethod #NEWLINE# def create_from_file( path ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# with open ( path ) as f : #NEWLINE# #INDENT# config = json . loads ( f . read ( ) ) #NEWLINE# return SystemModel ( ** config ) #NEWLINE# #UNINDENT# #UNINDENT# except ( ValueError , IOError ) as e : #NEWLINE# #INDENT# msg = 'Failed finding or parsing config at %s.' #NEWLINE# raise SftpConfigException ( ( msg % path ) , config )