Ensure url is a str for commonprefix

Fixes #1064.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2017-10-16 20:18:47 -04:00 committed by Sunil Mohan Adapa
parent 00d8e03d90
commit 21494f5615
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -42,7 +42,7 @@ def mark_active_menuitem(menu, path):
if not path.startswith(str(urlitem['url'])):
continue
match = os.path.commonprefix([urlitem['url'], path])
match = os.path.commonprefix([str(urlitem['url']), path])
if len(match) > len(best_match):
best_match = match
best_match_item = urlitem