summaryrefslogtreecommitdiff
path: root/src/data_forms.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-03-25 01:00:37 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-03-25 01:00:37 +0100
commite4f282834766abfc1776568da8f9fbbafe408332 (patch)
tree10d56a9302770fef275d72aac90334e7408f61b0 /src/data_forms.py
parent1916eedcdec2aaef63512e77fc2ed1741b3cedb7 (diff)
downloadpoezio-e4f282834766abfc1776568da8f9fbbafe408332.tar.gz
poezio-e4f282834766abfc1776568da8f9fbbafe408332.tar.bz2
poezio-e4f282834766abfc1776568da8f9fbbafe408332.tar.xz
poezio-e4f282834766abfc1776568da8f9fbbafe408332.zip
comment + fix an except
Diffstat (limited to 'src/data_forms.py')
-rw-r--r--src/data_forms.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/data_forms.py b/src/data_forms.py
index b1126e97..fcc6dca6 100644
--- a/src/data_forms.py
+++ b/src/data_forms.py
@@ -127,6 +127,9 @@ class FieldInput(object):
return ''
class DummyInput(FieldInput, windows.Win):
+ """
+ Used for fields that do not require any input ('fixed')
+ """
def __init__(self, field):
FieldInput.__init__(self, field)
windows.Win.__init__(self)
@@ -401,7 +404,7 @@ class FormWin(object):
continue
try:
input_class = self.input_classes[field['type']]
- except:
+ except IndexError:
continue
label = field['label']
desc = field['desc']
@@ -478,9 +481,7 @@ class FormWin(object):
label = self.inputs[i]['label']
self._win.addstr(y, 0, label)
self.inputs[i]['input'].resize(1, self.width//3, y+1, 2*self.width//3)
- # if field['description']:
- # y += 1
- # self._win.addstr(y, 0, field['description'])
+ # TODO: display the field description
y += 1
i += 1
if y >= self.height: