Project

General

Profile

Tâche #8065

Distribution EOLE - Scénario #8829: Demandes EOLE 2.4 déjà résolues

CreoleSet et les "valid_enum"

Added by Joël Cuissinat almost 7 years ago. Updated over 6 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
-
Start date:
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Remaining (hours):

Description

Les retours de CreoleSet ne sont pas toujours ceux qu'on attend si on essaie d'injecter des valeurs qui ne sont pas dans la liste des choix possibles d'une variable.
  • Cas général :
    root@amon:~# CreoleSet -d activer_log_distant toto
    root - La variable obligatoire 'activer_log_distant' de la famille 'Services' n'est pas renseignée !
    Traceback (most recent call last):
      File "/usr/bin/CreoleSet", line 60, in main
        config_save_values(config, 'creole')
      File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 516, in config_save_values
        store = config_get_values(config, namespace, check_mandatory)
      File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 453, in config_get_values
        raise PropertiesOptionError(u"\n".join(text), ('mandatory',))
    PropertiesOptionError: La variable obligatoire 'activer_log_distant' de la famille 'Services' n'est pas renseignée !
    
  • Cas particulier pour "eth0_method"
    root@amon:~# CreoleSet -d eth0_method toto
    root - AttributeError
    Traceback (most recent call last):
      File "/usr/bin/CreoleSet", line 60, in main
        config_save_values(config, 'creole')
      File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 516, in config_save_values
        store = config_get_values(config, namespace, check_mandatory)
      File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 442, in config_get_values
        mandatory_errors = list(mandatory_warnings(subconfig))
      File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 413, in mandatory_warnings
        force_properties=frozenset(('mandatory',)))
      File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 239, in getattr
        validate=validate)
      File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 264, in getattr
        force_permissive=force_permissive)
      File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 171, in getitem
        force_properties, validate_properties)
      File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 214, in _getitem
        value = self._getcallback_value(opt, max_len=lenmaster)
      File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 149, in _getcallback_value
        index=index, max_len=max_len)
      File "/usr/lib/python2.7/dist-packages/tiramisu/autolib.py", line 238, in carry_out_calculation
        ret = calculate(callback, args, kwargs)
      File "/usr/lib/python2.7/dist-packages/tiramisu/autolib.py", line 260, in calculate
        return callback(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/creole/eosfunc.py", line 611, in auto_eth
        if kw['parametre'].lower() == 'pppoe':
    AttributeError: 'NoneType' object has no attribute 'lower'
    Nom de variable inconnue : eth0_method
    

Related issues

Related to eole-skeletor - Tâche #8760: Compilation des éventuels fichiers de traduction. Fermé 11/12/2014

Associated revisions

Revision b80df0df (diff)
Added by Joël Cuissinat over 6 years ago

Modification du message d'erreur sur les valid_enum

Ref #8065 @30m

Revision d43396bb (diff)
Added by Benjamin Bohard over 6 years ago

Message sibyllin.

Ref #8065

History

#1 Updated by Joël Cuissinat over 6 years ago

  • Status changed from A étudier to En attente d'informations
  • Target version set to 231

Suite aux dernières modifications, c'est légèrement mieux :

root@amon:~# CreoleSet activer_log_distant toto
Valeur invalide : d'un optiondescription invalide

Il suffit juste d'améliorer le message renvoyé :)

#2 Updated by Joël Cuissinat over 6 years ago

  • % Done changed from 0 to 50

Message corrigé dans le programme mais il manque encore la traduction, or, on ne trouve pas les sources !

#3 Updated by Benjamin Bohard over 6 years ago

  • Status changed from En attente d'informations to Résolu
  • % Done changed from 50 to 100

Les fichiers po ont été mis à jour et la nouvelle phrase traduite.

#4 Updated by Luc Bourdot over 6 years ago

  • Parent task set to #8829

#5 Updated by Daniel Dehennin over 6 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF