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
1 changed files with 5 additions and 0 deletions

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()