Skip to content
Permalink
Browse files
Fix keyCommandsDoc raises UnboundLocalError for a malformed `sett…
…ingsSection` command (#11309)
  • Loading branch information
JulienCochuyt committed Jun 29, 2020
1 parent 675c4c5 commit da5ff4e8e112e0d9364e0338de7d18b9680cc944
Showing 1 changed file with 5 additions and 0 deletions.
@@ -180,6 +180,11 @@ def _command(self, cmd=None, arg=None):
# Each of the remaining columns provides keystrokes for one layout.
# There's one less delimiter than there are columns, hence subtracting 1 instead of 2.
self._settingsNumLayouts = arg.strip("|").count("|") - 1
if self._settingsNumLayouts < 1:
raise KeyCommandsError(
f"{self._lineNum}, settingsSection command must specify the header row for a table"
" summarising the settings"
)
elif cmd == "setting":
self._handleSetting()

0 comments on commit da5ff4e

Please sign in to comment.