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(