Skip to content

Commit

Permalink
chore: make server startup more error-tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydw committed Aug 20, 2021
1 parent 66e1e3f commit 94e535e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions grow/server/manager.py
Expand Up @@ -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)

Expand Down

0 comments on commit 94e535e

Please sign in to comment.