mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
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:
parent
00d8e03d90
commit
21494f5615
@ -42,7 +42,7 @@ def mark_active_menuitem(menu, path):
|
|||||||
if not path.startswith(str(urlitem['url'])):
|
if not path.startswith(str(urlitem['url'])):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
match = os.path.commonprefix([urlitem['url'], path])
|
match = os.path.commonprefix([str(urlitem['url']), path])
|
||||||
if len(match) > len(best_match):
|
if len(match) > len(best_match):
|
||||||
best_match = match
|
best_match = match
|
||||||
best_match_item = urlitem
|
best_match_item = urlitem
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user