From 48d8b5511c6df18b5e1ce994e95f7bcb4cb53576 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 31 Oct 2023 19:10:35 +0000 Subject: [PATCH] Check for conflicts --- create-nginx-map.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/create-nginx-map.py b/create-nginx-map.py index e5eabec..726864a 100644 --- a/create-nginx-map.py +++ b/create-nginx-map.py @@ -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()