From eabf9cc63abbd1ecb0151707c8b7811749b13c7a Mon Sep 17 00:00:00 2001 From: Thibault Ducret Date: Fri, 27 Dec 2024 11:53:48 +0100 Subject: [PATCH] Return package name only for exact app name Otherwise we may return the wrong package if an app name starts with the same prefix as another one. --- src/familylink/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/familylink/client.py b/src/familylink/client.py index 44e737c..9391d66 100644 --- a/src/familylink/client.py +++ b/src/familylink/client.py @@ -249,7 +249,7 @@ def _get_app_package_name(self, name: str) -> str: return name for app_name, package_name in self._app_names.items(): - if name.lower() in app_name.lower(): + if name.lower() == app_name.lower(): return package_name raise ValueError(f"Could not find package name for app: {name}")