mirror of
https://staging.allspice.dev/AllSpice-Demos/Actions-demo.git
synced 2025-04-24 09:13:21 +00:00
Add error handling
This commit is contained in:
parent
b8a9ad24ac
commit
4c3cbbd15b
@ -99,9 +99,12 @@ if __name__ == "__main__":
|
||||
writer.write(net + "\n")
|
||||
pins_on_net = netlist_rows[net]
|
||||
try:
|
||||
# Convert to list if it's not already, and then sort
|
||||
if not isinstance(pins_on_net, list):
|
||||
pins_on_net = list(pins_on_net)
|
||||
pins_on_net.sort()
|
||||
except TypeError:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(f"Error sorting pins on net {net}: {e}", file=sys.stderr)
|
||||
writer.write(" " + " ".join(pins_on_net) + "\n")
|
||||
|
||||
print("Generated PCB netlist.", file=sys.stderr)
|
||||
print("Generated PCB netlist.", file=sys.stderr)
|
Loading…
Reference in New Issue
Block a user