def __enter__(self): template_dict = Resources(Template.get_template_data(self._template_file)).to_json() resource = template_dict.get(model.RESOURCE, {}) func = self._get_function(self._get_namespace(resource)) self._runtime = Runtime(func[model.PROPERTY]) self._debug_context = DebugContext(self._debug_port, self._debug_argv, self._runtime.runtime) return self
def __enter__(self): template_dict = tcsam.tcsam_validate(Template.get_template_data(self._template_file)) resource = template_dict.get(tsmacro.Resources, {}) func = self._get_function(self._get_namespace(resource)) #self._check_function_type(resource) self._runtime = Runtime(func.get(tsmacro.Properties, {})) self._debug_context = DebugContext(self._debug_port, self._debug_argv, self._runtime.runtime) return self