From 94e535e10ab63e20a419937dad4440ade118ab2f Mon Sep 17 00:00:00 2001 From: Jeremy Weinstein Date: Fri, 20 Aug 2021 16:32:25 -0700 Subject: [PATCH] chore: make server startup more error-tolerant --- grow/server/manager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/grow/server/manager.py b/grow/server/manager.py index 72fc231c..602924fd 100644 --- a/grow/server/manager.py +++ b/grow/server/manager.py @@ -64,8 +64,12 @@ def print(self, log_function): def print_server_ready_message(pod, host, port): - home_doc = pod.get_home_doc() - root_path = home_doc.url.path if home_doc and home_doc.exists else '/' + try: + home_doc = pod.get_home_doc() + root_path = home_doc.url.path if home_doc and home_doc.exists else '/' + except: + root_path = '/' + pod.logger.exception('Failed to determine root URL path.') url_base = 'http://{}:{}/'.format(host, port) url_root = 'http://{}:{}{}'.format(host, port, root_path)