Check for conflicts
This commit is contained in:
parent
e05d88b259
commit
48d8b5511c
1 changed files with 5 additions and 0 deletions
|
@ -83,8 +83,13 @@ def main():
|
||||||
case "dokku":
|
case "dokku":
|
||||||
routes.extend(get_dokku_routes(source["url"], source["destination"]))
|
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")):
|
for route in sorted(routes, key=operator.attrgetter("hostname")):
|
||||||
print(f"{route.hostname}\t{route.destination}; # {route.name}")
|
print(f"{route.hostname}\t{route.destination}; # {route.name}")
|
||||||
|
|
||||||
|
print("Found", len(routes), "routes")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Reference in a new issue