Exemplo n.º 1
0
Arquivo: yaml.py Projeto: i386x/abcdoc
    def construct_yaml_timestamp(self, node):
        """
        """

        timestamp = SafeConstructor.construct_yaml_timestamp(self, node)
        if isinstance(timestamp, datetime.date):
            data = YamlDate(timestamp.year, timestamp.month, timestamp.day)
        else:
            data = YamlDateTime(
                timestamp.year, timestamp.month, timestamp.day,
                timestamp.hour, timestamp.minute, timestamp.second,
                timestamp.microsecond
            )
        mark = node.start_mark
        if self.__filename is not None:
            mark.name = self.__filename
        data.mark = mark
        return data
 def construct_yaml_timestamp(self, node):
     obj = SafeConstructor.construct_yaml_timestamp(self, node)
     return self._holder(obj, node)
Exemplo n.º 3
0
 def construct_yaml_timestamp(self, node):
     obj = SafeConstructor.construct_yaml_timestamp(self, node)
     return self._holder(obj, node)