From 21494f5615ea5f4bf50379024ae58af4462d73fa Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Mon, 16 Oct 2017 20:18:47 -0400 Subject: [PATCH] Ensure url is a str for commonprefix Fixes #1064. Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- plinth/templatetags/plinth_extras.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plinth/templatetags/plinth_extras.py b/plinth/templatetags/plinth_extras.py index e3def79a1..b862887ee 100644 --- a/plinth/templatetags/plinth_extras.py +++ b/plinth/templatetags/plinth_extras.py @@ -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