From 8bcc25c971ae07d33263e4ebf35553093ebf2678 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 9 Mar 2024 20:10:52 -0500 Subject: [PATCH] Use `str.partition()`for robustness. Co-authored-by: dgelessus --- Scripts/Python/xOptionsMenu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/Python/xOptionsMenu.py b/Scripts/Python/xOptionsMenu.py index 855dd7e327..64722ec7a5 100644 --- a/Scripts/Python/xOptionsMenu.py +++ b/Scripts/Python/xOptionsMenu.py @@ -1776,9 +1776,9 @@ def LoadKeyMap(self): km.bindKeyToConsoleCommand(mappedKey, controlCode) else: controlStr = km.convertControlCodeToString(controlCode) - keys = mappedKey.split("$") - PtDebugPrint(f"xOptionsMenu.LoadKeyMap(): Binding {keys=} to {controlStr=}", level=kWarningLevel) - km.bindKey(*keys, controlStr) + key1, _, key2 = mappedKey.partition("$") + PtDebugPrint(f"xOptionsMenu.LoadKeyMap(): Binding {key1=} & {key2=} to {controlStr=}", level=kWarningLevel) + km.bindKey(key1, key2, controlStr) def IsThereACover(self,bookHtml): # search the bookhtml string looking for a cover