Ejemplo n.º 1
0
 def _get_writer(self, path, generator):
     if not path:
         return NullMarkupWriter()
     try:
         writer = XmlWriter(path, encoding='UTF-8')
     except EnvironmentError, err:
         raise DataError("Opening output file '%s' failed: %s" %
                         (path, err.strerror))
Ejemplo n.º 2
0
 def _get_writer(self, path, rpa, generator):
     if not path:
         return NullMarkupWriter()
     writer = XmlWriter(path, write_empty=False, usage='output')
     writer.start('robot', {'generator': get_full_version(generator),
                            'generated': get_timestamp(),
                            'rpa': 'true' if rpa else 'false'})
     return writer
Ejemplo n.º 3
0
 def _get_writer(self, path, generator):
     if not path:
         return NullMarkupWriter()
     try:
         writer = XmlWriter(path, encoding='UTF-8', write_empty=False)
     except EnvironmentError as err:
         raise DataError("Opening output file '%s' failed: %s" %
                         (path, err.strerror))
     writer.start('robot', {'generator': get_full_version(generator),
                            'generated': get_timestamp()})
     return writer