def construct_yaml_str(self, node): """ """ data = YamlStr(SafeConstructor.construct_yaml_str(self, node)) mark = node.start_mark if self.__filename is not None: mark.name = self.__filename data.mark = mark return data
def construct_yaml_str(self, node): obj = SafeConstructor.construct_yaml_str(self, node) try: obj = str(obj) except UnicodeEncodeError: raise DSLParsingInputTypeException( ERROR_INVALID_CHARS, 'illegal characters in line: {0}, column: {1}. ' 'Only valid ascii chars are supported.'.format( node.start_mark.line, node.start_mark.column)) return self._holder(obj, node)
def construct_yaml_str(self, node): obj = SafeConstructor.construct_yaml_str(self, node) try: obj = str(obj) except UnicodeEncodeError: raise DSLParsingInputTypeException( ERROR_INVALID_CHARS, 'illegal characters in line: {0}, column: {1}. ' 'Only valid ascii chars are supported.'.format( node.start_mark.line, node.start_mark.column)) return self._holder(obj, node)
def construct_yaml_str(self, node): obj = SafeConstructor.construct_yaml_str(self, node) assert isinstance(obj, str) # nosec return StrNode(obj, node.start_mark, node.end_mark)
def construct_yaml_str(self, node): obj = SafeConstructor.construct_yaml_str(self, node) assert isinstance(obj, (six.string_types)) return str_node(obj, node.start_mark, node.end_mark)
def construct_yaml_str(self, node): obj = SafeConstructor.construct_yaml_str(self, node) return self._holder(obj, node)
def construct_yaml_str(self, node): obj = SafeConstructor.construct_yaml_str(self, node) return self._holder(obj, node)