diff options
author | Hugo Osvaldo Barrera <hugo@whynothugo.nl> | 2023-06-06 12:18:29 +0200 |
---|---|---|
committer | Hugo Osvaldo Barrera <hugo@whynothugo.nl> | 2023-06-06 12:23:18 +0200 |
commit | 2c3c36c0eb17e5a3337263cf314bbd6c51ede028 (patch) | |
tree | 5813095f2d63230830753de90dd9b0a52a1a6293 | |
parent | 7b2b637f41a895f44357c915ca77904e73a3f614 (diff) |
Collapse if/elif with same body
-rw-r--r-- | khal/ui/base.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/khal/ui/base.py b/khal/ui/base.py index eac5b42b..7e2767f9 100644 --- a/khal/ui/base.py +++ b/khal/ui/base.py @@ -202,9 +202,7 @@ class Window(urwid.Frame): def on_key_press(self, key): """Handle application-wide key strokes.""" - if key in self.quit_keys: - self.backtrack() - elif key == 'esc' and not self.is_top_level(): + if (key in self.quit_keys) or (key == 'esc' and not self.is_top_level()): self.backtrack() return key |