Project

General

Profile

Tâche #5151

Scénario #9379: Consolidation CREOLE

Problème de gestion des « valid_entier »

Added by Daniel Dehennin over 8 years ago. Updated about 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
10/28/2014
Due date:
11/07/2014
% Done:

100%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

J’utilise des <check name='valid_entier'> avec spécification d’une valeur minimal et maximale pour le dictionnaire eole-smartmontools:source:dicos/02_smartmontools.xml.

L’outil gen_config me renvoi

Traceback (most recent call last):
  File "/usr/share/creole/gen_config.py", line 1293, in _callback_focus_out
    self._value_changed(notebook, var, widget.get_text())
  File "/usr/share/creole/gen_config.py", line 38, in newfunc
    return func(*targs, **kwargs)
  File "/usr/share/creole/gen_config.py", line 1320, in _value_changed
    ret_set_value = self._set_value(var, value, cpt)
  File "/usr/share/creole/gen_config.py", line 188, in _set_value
    oldvalue[index] = unicode(value, 'utf8')
  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 242, in __setitem__
    self._validate(value)
  File "/usr/lib/python2.7/dist-packages/tiramisu/value.py", line 264, in _validate
    "for option {1}".format(str(value), self.opt._name))
ConfigError: invalid value 203 for option smartmontools_devs_attrs_fail_ignore
-> entering _error_window((<__main__.ConfigGui object at 0x269da50>, 'invalid value 203 for option smartmontools_devs_attrs_fail_ignore'), {})
invalid value 203 for option smartmontools_devs_attrs_fail_ignore

Related issues

Related to creole - Evolution #5124: Cas non géré par creole.loader [2.4] Ne sera pas résolu

History

#1 Updated by Daniel Dehennin over 8 years ago

Chose intéressante, cela ne se produit que via gen_config :

>>> from creole.loader import creole_loader
>>> conf = creole_loader()
>>> conf.cfgimpl_get_settings().read_write()
>>> conf.creole.services.activer_smartmontools = 'oui'
>>> conf.creole.smartmontools.smartmontools_devs_attrs_fail_ignore = [190]
>>> conf.creole.smartmontools.smartmontools_devs_attrs_fail_ignore.append(192)
>>> conf.creole.smartmontools
[smartmontools_devs]
smartmontools_mail = non
[]
smartmontools_devs_attrs_fail_ignore = [190, 192]
[]
>>> conf.creole.smartmontools.smartmontools_devs_attrs_fail_ignore = ['a']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 167, in __setattr__
    self.setoption(name, value)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 263, in setoption
    child.setoption(self, value)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 279, in setoption
    raise ConfigError('invalid value %s for option %s' % (value, name))
tiramisu.error.ConfigError: invalid value ['a'] for option smartmontools_devs_attrs_fail_ignore

#2 Updated by Luc Bourdot about 7 years ago

  • Parent task set to #9379

#3 Updated by Joël Cuissinat about 7 years ago

  • Estimated time set to 3.00 h
  • Remaining (hours) set to 3.0

#4 Updated by Emmanuel GARETTE about 7 years ago

  • Status changed from Nouveau to En cours
  • Start date set to 10/28/2014

#5 Updated by Emmanuel GARETTE about 7 years ago

  • Due date set to 11/07/2014
  • Status changed from En cours to Fermé
  • Assigned To set to Emmanuel GARETTE
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 3.0 to 0.0

Pas de problème avec gen_config 2.4 version web.

Also available in: Atom PDF