Project

General

Profile

Anomalie #4811

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

Added by Daniel Dehennin almost 7 years ago. Updated almost 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
01/31/2013
Due date:
02/01/2013
% Done:

100%

Spent time:
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

Associated revisions

Revision 03baedd4 (diff)
Added by Daniel Dehennin almost 7 years ago

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

History

#1 Updated by Daniel Dehennin almost 7 years ago

  • Status changed from Accepté to Résolu
  • % Done changed from 0 to 100

#2 Updated by Joël Cuissinat almost 7 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF