Fix edge-case when printing terminal title
This commit is contained in:
@@ -418,8 +418,11 @@ class Page(object):
|
|||||||
# Set the terminal title
|
# Set the terminal title
|
||||||
if len(sub_name) > 50:
|
if len(sub_name) > 50:
|
||||||
title = sub_name.strip('/')
|
title = sub_name.strip('/')
|
||||||
title = title.rsplit('/', 1)[1]
|
|
||||||
title = title.replace('_', ' ')
|
title = title.replace('_', ' ')
|
||||||
|
try:
|
||||||
|
title = title.rsplit('/', 1)[1]
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
title = sub_name
|
title = sub_name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user