#NEWLINE# def load_from_path( path , mutable = False ) : #NEWLINE# #INDENT# 'Loads a TOML file from the path\n\n    :param path: Path to the TOML file\n    :type path: str\n    :param mutable: True if the returned Toml object should be mutable\n    :type mutable: boolean\n    :returns: Map for the configuration file\n    :rtype: Toml | MutableToml\n    ' #NEWLINE# util . ensure_file_exists ( path ) #NEWLINE# with util . open_file ( path , 'r' ) as config_file : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# toml_obj = toml . loads ( config_file . read ( ) ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise DCOSException ( 'Error parsing config file at [{}]: {}' . format ( path , mutable ) ) #NEWLINE# #UNINDENT# return ( MutableToml if mutable else Toml ) ( toml_obj )