From 9fb0deca0af1b60c0adc3873de762ec484564973 Mon Sep 17 00:00:00 2001 From: Jack Urbanek Date: Fri, 20 Oct 2023 14:26:35 -0400 Subject: [PATCH] Update heroku_architect.py (#1062) * Update heroku_architect.py Addressing #1060 * Fixed code styling --------- Co-authored-by: Paul Abumov --- mephisto/abstractions/architects/heroku_architect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mephisto/abstractions/architects/heroku_architect.py b/mephisto/abstractions/architects/heroku_architect.py index 5b609c660..88b0bdc30 100644 --- a/mephisto/abstractions/architects/heroku_architect.py +++ b/mephisto/abstractions/architects/heroku_architect.py @@ -421,7 +421,10 @@ def __setup_heroku_server(self) -> str: domains = subprocess.check_output( shlex.split(f"{heroku_executable_path} domains -a {heroku_app_name}") ).decode() - self.__heroku_app_url = domains.split("\n")[1] + possible_domains = domains.split("\n")[1:] + while possible_domains[0].strip() == "": + possible_domains.pop(0) + self.__heroku_app_url = possible_domains[0] return "https://{}".format(self.__heroku_app_url) def __delete_heroku_server(self):