Make :scroll error message deterministic.
This commit is contained in:
parent
17396e1030
commit
85608a8b8d
@ -566,6 +566,7 @@ class CommandDispatcher:
|
|||||||
dy: Deprecated argument to support the old dx/dy form.
|
dy: Deprecated argument to support the old dx/dy form.
|
||||||
count: multiplier
|
count: multiplier
|
||||||
"""
|
"""
|
||||||
|
# pylint: disable=too-many-locals
|
||||||
try:
|
try:
|
||||||
# Check for deprecated dx/dy form (like with scroll-px).
|
# Check for deprecated dx/dy form (like with scroll-px).
|
||||||
dx = float(direction)
|
dx = float(direction)
|
||||||
@ -592,9 +593,10 @@ class CommandDispatcher:
|
|||||||
try:
|
try:
|
||||||
key = fake_keys[direction]
|
key = fake_keys[direction]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
expected_values = ', '.join(sorted(fake_keys))
|
||||||
raise cmdexc.CommandError("Invalid value {!r} for direction - "
|
raise cmdexc.CommandError("Invalid value {!r} for direction - "
|
||||||
"expected one of: {}".format(
|
"expected one of: {}".format(
|
||||||
direction, ', '.join(fake_keys)))
|
direction, expected_values))
|
||||||
widget = self._current_widget()
|
widget = self._current_widget()
|
||||||
frame = widget.page().currentFrame()
|
frame = widget.page().currentFrame()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user