add multi parsing
This commit is contained in:
parent
d4b551f2ca
commit
7965c53ab2
1 changed files with 11 additions and 11 deletions
|
@ -19,6 +19,8 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
from .helper import get_rougail_environment_var, get_rougail_environment_dict
|
||||
|
||||
from rougail.object_model import CONVERT_OPTION
|
||||
from rougail.config import RougailConfig
|
||||
from tiramisu.error import ValueOptionError
|
||||
|
@ -88,20 +90,18 @@ class RougailUserDataEnvironment:
|
|||
type_obj = None
|
||||
type_obj = CONVERT_OPTION.get(option_type, {}).get("func")
|
||||
|
||||
from .helper import get_rougail_environment_var, get_rougail_environment_dict
|
||||
# print(CONVERT_OPTION)
|
||||
|
||||
rougail_environment_var = get_rougail_environment_var()
|
||||
option_name = option.path()
|
||||
if option_name in rougail_environment_var:
|
||||
if ismulti:
|
||||
pass
|
||||
option_bash_value = get_rougail_environment_dict()[option_name]
|
||||
option_value = option_bash_value.split(",")
|
||||
option.value.set(option_value)
|
||||
else:
|
||||
option.value.set(get_rougail_environment_dict()[option_name])
|
||||
#option.value.set(["78", "52"])
|
||||
# TODO
|
||||
# - tester les var commençant par ROUGAIL_
|
||||
# 'ROUGAIL_'
|
||||
# tester si c'est une multi
|
||||
# le CONVERT_TYPE ne marchera pas si c'est une multi
|
||||
# récupérer le nam de l'option pour voir si elle est dans l'env
|
||||
|
||||
|
||||
|
||||
#RougailValidator.option = option
|
||||
#RougailValidator.option_type = {'type': option_type,
|
||||
|
|
Loading…
Reference in a new issue