summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Osvaldo Barrera <hugo@whynothugo.nl>2023-06-06 12:18:29 +0200
committerHugo Osvaldo Barrera <hugo@whynothugo.nl>2023-06-06 12:23:18 +0200
commit2c3c36c0eb17e5a3337263cf314bbd6c51ede028 (patch)
tree5813095f2d63230830753de90dd9b0a52a1a6293
parent7b2b637f41a895f44357c915ca77904e73a3f614 (diff)
Collapse if/elif with same body
-rw-r--r--khal/ui/base.py4
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