Projet

Général

Profil

Anomalie #4811

Erreur lors de l’ajout de variable à une multi non groupée

Ajouté par Daniel Dehennin il y a environ 11 ans. Mis à jour il y a environ 11 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Début:
31/01/2013
Echéance:
01/02/2013
% réalisé:

100%

Temps passé:
Distribution:
EOLE 2.4

Description

Lorsqu’une variable multi n’a pas de slave, tiramisu plante avec le message:

Traceback (most recent call last):
  File "/usr/share/creole/gen_config.py", line 45, in newfunc
    return func(*targs, **kwargs)
  File "/usr/share/creole/gen_config.py", line 1718, in _double_click_entry
    self._add_notebook_page(self.gc_widgets[var]['notebook'], var)
  File "/usr/share/creole/gen_config.py", line 45, in newfunc
    return func(*targs, **kwargs)
  File "/usr/share/creole/gen_config.py", line 1118, in _add_notebook_page
    self.eole_dico.variables[var].add_default_value()
  File "/usr/lib/python2.7/dist-packages/creole/cfgparser.py", line 163, in add_default_value
    val.append(self.obj.getdefault_multi())
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 89, in append
    if master == multi.opt._name:
UnboundLocalError: local variable 'master' referenced before assignment

Révisions associées

Révision 03baedd4 (diff)
Ajouté par Daniel Dehennin il y a environ 11 ans

Fix appending to a non-grouped multi

When the multi is not grouped, just set the value and do not try to
update len of inexistant slaves.

The code path try to update the len of all other variables under the
OptionDescription of the multi.

  • tiramisu/option.py (Multi.append): return after setting the value.

Fixes: #4811 @10m

Historique

#1 Mis à jour par Daniel Dehennin il y a environ 11 ans

  • Statut changé de Accepté à Résolu
  • % réalisé changé de 0 à 100

#2 Mis à jour par Joël Cuissinat il y a environ 11 ans

  • Statut changé de Résolu à Fermé

Formats disponibles : Atom PDF