MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / update_image_randomizer

Method update_image_randomizer

shared.py:1748–1769  ·  view source on GitHub ↗

Update the image randomizer and the imagegen variable.

(self)

Source from the content-addressed store, hash-verified

1746 logger.error(f"Error decoding JSON from actions file: {e}")
1747 return
1748 except Exception as e:
1749 logger.error(f"Unexpected error reading actions file: {e}")
1750 return
1751
1752 headers = ["MAC Address", "IPs", "Hostnames", "Alive", "Ports", "Failed_Pings"] + action_names
1753
1754 try:
1755 with open(self.netkbfile, 'w', newline='') as file:
1756 writer = csv.writer(file)
1757 writer.writerow(headers)
1758 logger.info(f"Network knowledge base CSV file created at {self.netkbfile}")
1759 except IOError as e:
1760 logger.error(f"Error writing to netkbfile: {e}")
1761 except Exception as e:
1762 logger.error(f"Unexpected error while writing to netkbfile: {e}")
1763 else:
1764 logger.info(f"Network knowledge base CSV file already exists at {self.netkbfile}")
1765 except Exception as e:
1766 logger.error(f"Unexpected error in initialize_csv: {e}")
1767
1768
1769 def load_config(self):
1770 """Load the configuration from the shared configuration JSON file."""
1771 try:
1772 logger.info("Loading configuration...")

Callers 1

update_main_imageMethod · 0.80

Calls 2

warningMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected