Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
print("No breed named '%s' found" % name)
sys.exit(1)
else:
print("No breeds found in the signature, a signature update is recommended")
sys.exit(1)
return
else:
item = remote.get_item(otype, name)
if item == "~":
print("No %s found: %s" % (otype, name))
sys.exit(1)
if otype == "distro":
data = utils.to_string_from_fields(item, distro.FIELDS)
elif otype == "profile":
data = utils.to_string_from_fields(item, profile.FIELDS)
elif otype == "system":
data = utils.to_string_from_fields(item, system.FIELDS,
system.NETWORK_INTERFACE_FIELDS)
elif otype == "repo":
data = utils.to_string_from_fields(item, repo.FIELDS)
elif otype == "image":
data = utils.to_string_from_fields(item, image.FIELDS)
elif otype == "mgmtclass":
data = utils.to_string_from_fields(item, mgmtclass.FIELDS)
elif otype == "package":
data = utils.to_string_from_fields(item, package.FIELDS)
elif otype == "file":
data = utils.to_string_from_fields(item, file.FIELDS)
elif otype == "setting":
data = "%-40s: %s" % (item['name'], item['value'])
print(data)
print("\nBreed '%s' has %d total signatures" % (name, total_sigs))
else:
print("No breed named '%s' found" % name)
sys.exit(1)
else:
print("No breeds found in the signature, a signature update is recommended")
sys.exit(1)
return
else:
item = remote.get_item(otype, name)
if item == "~":
print("No %s found: %s" % (otype, name))
sys.exit(1)
if otype == "distro":
data = utils.to_string_from_fields(item, distro.FIELDS)
elif otype == "profile":
data = utils.to_string_from_fields(item, profile.FIELDS)
elif otype == "system":
data = utils.to_string_from_fields(item, system.FIELDS,
system.NETWORK_INTERFACE_FIELDS)
elif otype == "repo":
data = utils.to_string_from_fields(item, repo.FIELDS)
elif otype == "image":
data = utils.to_string_from_fields(item, image.FIELDS)
elif otype == "mgmtclass":
data = utils.to_string_from_fields(item, mgmtclass.FIELDS)
elif otype == "package":
data = utils.to_string_from_fields(item, package.FIELDS)
elif otype == "file":
data = utils.to_string_from_fields(item, file.FIELDS)
elif otype == "setting":
print("No %s found: %s" % (otype, name))
sys.exit(1)
if otype == "distro":
data = utils.to_string_from_fields(item, distro.FIELDS)
elif otype == "profile":
data = utils.to_string_from_fields(item, profile.FIELDS)
elif otype == "system":
data = utils.to_string_from_fields(item, system.FIELDS,
system.NETWORK_INTERFACE_FIELDS)
elif otype == "repo":
data = utils.to_string_from_fields(item, repo.FIELDS)
elif otype == "image":
data = utils.to_string_from_fields(item, image.FIELDS)
elif otype == "mgmtclass":
data = utils.to_string_from_fields(item, mgmtclass.FIELDS)
elif otype == "package":
data = utils.to_string_from_fields(item, package.FIELDS)
elif otype == "file":
data = utils.to_string_from_fields(item, file.FIELDS)
elif otype == "setting":
data = "%-40s: %s" % (item['name'], item['value'])
print(data)
return
else:
item = remote.get_item(otype, name)
if item == "~":
print("No %s found: %s" % (otype, name))
sys.exit(1)
if otype == "distro":
data = utils.to_string_from_fields(item, distro.FIELDS)
elif otype == "profile":
data = utils.to_string_from_fields(item, profile.FIELDS)
elif otype == "system":
data = utils.to_string_from_fields(item, system.FIELDS,
system.NETWORK_INTERFACE_FIELDS)
elif otype == "repo":
data = utils.to_string_from_fields(item, repo.FIELDS)
elif otype == "image":
data = utils.to_string_from_fields(item, image.FIELDS)
elif otype == "mgmtclass":
data = utils.to_string_from_fields(item, mgmtclass.FIELDS)
elif otype == "package":
data = utils.to_string_from_fields(item, package.FIELDS)
elif otype == "file":
data = utils.to_string_from_fields(item, file.FIELDS)
elif otype == "setting":
data = "%-40s: %s" % (item['name'], item['value'])
print(data)
else:
print("No breeds found in the signature, a signature update is recommended")
sys.exit(1)
return
else:
item = remote.get_item(otype, name)
if item == "~":
print("No %s found: %s" % (otype, name))
sys.exit(1)
if otype == "distro":
data = utils.to_string_from_fields(item, distro.FIELDS)
elif otype == "profile":
data = utils.to_string_from_fields(item, profile.FIELDS)
elif otype == "system":
data = utils.to_string_from_fields(item, system.FIELDS,
system.NETWORK_INTERFACE_FIELDS)
elif otype == "repo":
data = utils.to_string_from_fields(item, repo.FIELDS)
elif otype == "image":
data = utils.to_string_from_fields(item, image.FIELDS)
elif otype == "mgmtclass":
data = utils.to_string_from_fields(item, mgmtclass.FIELDS)
elif otype == "package":
data = utils.to_string_from_fields(item, package.FIELDS)
elif otype == "file":
data = utils.to_string_from_fields(item, file.FIELDS)
elif otype == "setting":
data = "%-40s: %s" % (item['name'], item['value'])
print(data)
def to_string(self):
return utils.to_string_from_fields(self, self.get_fields())
data = utils.to_string_from_fields(item, distro.FIELDS)
elif otype == "profile":
data = utils.to_string_from_fields(item, profile.FIELDS)
elif otype == "system":
data = utils.to_string_from_fields(item, system.FIELDS,
system.NETWORK_INTERFACE_FIELDS)
elif otype == "repo":
data = utils.to_string_from_fields(item, repo.FIELDS)
elif otype == "image":
data = utils.to_string_from_fields(item, image.FIELDS)
elif otype == "mgmtclass":
data = utils.to_string_from_fields(item, mgmtclass.FIELDS)
elif otype == "package":
data = utils.to_string_from_fields(item, package.FIELDS)
elif otype == "file":
data = utils.to_string_from_fields(item, file.FIELDS)
elif otype == "setting":
data = "%-40s: %s" % (item['name'], item['value'])
print(data)