1
Fork 0

Check for conflicts

This commit is contained in:
Jake Howard 2023-10-31 19:10:35 +00:00
parent e05d88b259
commit 48d8b5511c
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -83,8 +83,13 @@ def main():
case "dokku":
routes.extend(get_dokku_routes(source["url"], source["destination"]))
if len(routes) != len(set(routes)):
raise ValueError("Conflict found!")
for route in sorted(routes, key=operator.attrgetter("hostname")):
print(f"{route.hostname}\t{route.destination}; # {route.name}")
print("Found", len(routes), "routes")
if __name__ == "__main__":
main()