mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
questions prompt: include normalize in the try/except to re-ask question if not properly formated
This commit is contained in:
parent
78ad3b5da3
commit
d023333fa4
1 changed files with 2 additions and 5 deletions
|
@ -520,12 +520,9 @@ class Question(object):
|
||||||
):
|
):
|
||||||
self.value = class_default if self.default is None else self.default
|
self.value = class_default if self.default is None else self.default
|
||||||
|
|
||||||
# Normalization
|
|
||||||
# This is done to enforce a certain formating like for boolean
|
|
||||||
self.value = self.normalize(self.value, self)
|
|
||||||
|
|
||||||
# Prevalidation
|
|
||||||
try:
|
try:
|
||||||
|
# Normalize and validate
|
||||||
|
self.value = self.normalize(self.value, self)
|
||||||
self._prevalidate()
|
self._prevalidate()
|
||||||
except YunohostValidationError as e:
|
except YunohostValidationError as e:
|
||||||
# If in interactive cli, re-ask the current question
|
# If in interactive cli, re-ask the current question
|
||||||
|
|
Loading…
Add table
Reference in a new issue