Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

Commit 9b42961

Browse files
committed
Robust direction casting
1 parent a5299cb commit 9b42961

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/animate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def set_view(self, view: tk.Widget):
255255

256256
def change_view(self, view: tk.Widget, direction: Direction):
257257
if not isinstance(direction, Direction):
258-
direction = Direction[direction] # Cast string for convenience
258+
direction = Direction[direction.upper()] # Cast string for convenience
259259

260260
if direction in (Direction.UP, Direction.DOWN):
261261
edge = self.winfo_screenheight()

0 commit comments

Comments
 (0)