Fix edge-case when printing terminal title

This commit is contained in:
Michael Lazar
2019-02-02 21:00:27 -05:00
parent f44a04c935
commit 93a96e5f51

View File

@@ -418,8 +418,11 @@ class Page(object):
# Set the terminal title
if len(sub_name) > 50:
title = sub_name.strip('/')
title = title.rsplit('/', 1)[1]
title = title.replace('_', ' ')
try:
title = title.rsplit('/', 1)[1]
except IndexError:
pass
else:
title = sub_name