Merge pull request #643 from michael-lazar/title_index_error

Fix edge-case when printing terminal title
This commit is contained in:
Michael Lazar authored and GitHub committed 2019-02-02 21:12:40 -05:00
commit 9847932ff5
1 file changed
+4 -1
+4 -1
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