Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def selector(self, output):
if isinstance(output, Host):
return self.parse(output, FieldLists.HOST)
elif isinstance(output, Scan):
return self.parse(output, FieldLists.SCAN)
elif isinstance(output, Report):
return self.parse(output, FieldLists.REPORT)
else:
return output