def __exportResultsToTXT(self, objToExport, txtFile): """Export results to text file""" fileExporter = FileExporter() self.Logger.Print('Saving results to {} text file.'.format(txtFile)) success = False if type(objToExport) is IpGeoLocation: success = fileExporter.ExportToTXT(objToExport, txtFile) elif type(objToExport) is list: success = fileExporter.ExportListToTXT(objToExport, txtFile) if not success: self.Logger.PrintError('Saving results to {} text file failed.'.format(txtFile))
def __exportResultsToXML(self, objToExport, xmlFile): """Export results to xml file""" fileExporter = FileExporter() self.Logger.Print('Saving results to {} XML file.'.format(xmlFile)) success = False if type(objToExport) is vaporwave: success = fileExporter.ExportToXML(objToExport, xmlFile) elif type(objToExport) is list: success = fileExporter.ExportListToXML(objToExport, xmlFile) if not success: self.Logger.PrintError( 'Saving results to {} XML file failed.'.format(xmlFile))