From fe759f61e3c3299452eb18c80dcdd0d0efdde88f Mon Sep 17 00:00:00 2001 From: Peter Oettig Date: Fri, 12 Dec 2025 16:05:16 +0100 Subject: [PATCH] fix: pass generate could have empty location --- __init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8e25e71..3572d7b 100644 --- a/__init__.py +++ b/__init__.py @@ -78,7 +78,17 @@ def handleTriggerQuery(self, query): self.showPasswords(query) def generatePassword(self, query): - location = query.string.strip()[9:] + location = query.string.strip()[9:].strip() + if not location: + query.add( + StandardItem( + id="generate_password", + icon_factory=lambda: Plugin.makeIcon(self), + text="Can't generate a new password", + subtext="The location for the new password is invalid", + ) + ) + return query.add( StandardItem(