Exemplo n.º 1
0
Arquivo: yaml.py Projeto: i386x/abcdoc
    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
Exemplo n.º 2
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 7
0
 def construct_yaml_str(self, node):
     obj = SafeConstructor.construct_yaml_str(self, node)
     return self._holder(obj, node)