diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-09-19 15:36:21 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-09-19 15:37:01 +0200 |
commit | 06217c4a0cde140eed1ca92aa8903890206451bc (patch) | |
tree | 7b3b39f3cb76a5cccc2328620f5c1267bfcd290e | |
parent | e1c0e3716b23247fc6687e774cdce80f74593719 (diff) | |
download | poezio-06217c4a0cde140eed1ca92aa8903890206451bc.tar.gz poezio-06217c4a0cde140eed1ca92aa8903890206451bc.tar.bz2 poezio-06217c4a0cde140eed1ca92aa8903890206451bc.tar.xz poezio-06217c4a0cde140eed1ca92aa8903890206451bc.zip |
Do not traceback when displaying a data form with 0 input
-rw-r--r-- | src/windows/data_forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/windows/data_forms.py b/src/windows/data_forms.py index 86f33350..0978f5e3 100644 --- a/src/windows/data_forms.py +++ b/src/windows/data_forms.py @@ -455,7 +455,7 @@ class FormWin(object): inp['label'].refresh() inp['input'].refresh() inp['label'].refresh() - if self.current_input < self.height-1: + if self.inputs and self.current_input < self.height-1: self.inputs[self.current_input]['input'].set_color(get_theme().COLOR_SELECTED_ROW) self.inputs[self.current_input]['input'].refresh() self.inputs[self.current_input]['label'].set_color(get_theme().COLOR_SELECTED_ROW) @@ -465,7 +465,7 @@ class FormWin(object): self.inputs[self.current_input]['input'].refresh() def get_help_message(self): - if self.current_input < self.height-1 and self.inputs[self.current_input]['input']: + if self.inputs and self.current_input < self.height-1 and self.inputs[self.current_input]['input']: return self.inputs[self.current_input]['input'].get_help_message() return '' |