Skip to content

Commit

Permalink
Use str.partition()for robustness.
Browse files Browse the repository at this point in the history
Co-authored-by: dgelessus <[email protected]>
  • Loading branch information
Hoikas and dgelessus authored Mar 10, 2024
1 parent 2c6e943 commit 8bcc25c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Scripts/Python/xOptionsMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8bcc25c

Please sign in to comment.