From cf2aaaf52f138c5f784ed6bdde1cf2a495aaad05 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 27 Nov 2024 01:56:17 +0530 Subject: [PATCH] remote_control_password: Fix using a password without any actions not working Fixes #8082 --- docs/changelog.rst | 2 ++ kitty/options/utils.py | 2 +- kitty/remote_control.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 08bdb34a5..f2f0f1883 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -103,6 +103,8 @@ Detailed list of changes - panel kitten: Allow creating floating and on-top panels with arbitrary placement and size on Wayland (:pull:`8068`) +- :opt:`remote_control_password`: Fix using a password without any actions not working (:iss:`8082`) + 0.37.0 [2024-10-30] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/options/utils.py b/kitty/options/utils.py index 8e2e0fa37..0272f0e37 100644 --- a/kitty/options/utils.py +++ b/kitty/options/utils.py @@ -811,7 +811,7 @@ def remote_control_password(val: str, current_val: Dict[str, str]) -> Iterable[T # line of remote_control_password raise ValueError('Passwords are not allowed to start with hyphens, ignoring this password') if len(parts) == 1: - yield "", (parts[0],) + yield parts[0], () else: yield parts[0], tuple(parts[1:]) diff --git a/kitty/remote_control.py b/kitty/remote_control.py index fae3d02b1..3e1156d68 100644 --- a/kitty/remote_control.py +++ b/kitty/remote_control.py @@ -127,7 +127,7 @@ def remote_control_allowed( class PasswordAuthorizer: - def __init__(self, auth_items: frozenset[str]) -> None: + def __init__(self, auth_items: Iterable[str]) -> None: self.command_patterns = [] self.function_checkers = [] self.name = ''