Project

General

Profile

Tâche #9495

Distribution EOLE - Scénario #9446: Divers 2.4

KeyError si présence d'une variable inconnue dans un check

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

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

100%

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

Description

En voulant qualifier #9472, j'ai constaté qu'il n'y avait pas de message d'erreur prévu pour ce cas.

Avec le dico joint, ça donne :

root@horus:~# creoled --debug
creoled - Chargement de la configuration tiramisu
creoled - Set umask to 0022
creoled - Impossible de charger la configuration Creole.var_inconnue
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/creole/server.py", line 199, in reload_config
    try_upgrade=False)
  File "/usr/lib/python2.7/dist-packages/creole/loader.py", line 287, in creole_loader
    loader.read_dir(dirs, namespace)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 979, in read_dir
    self._gen_descr(namespace)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 1435, in _gen_descr
    self._gen_consistencies(namespace)
  File "/usr/lib/python2.7/dist-packages/creole/var_loader.py", line 1118, in _gen_consistencies
    raise err
KeyError: 'var_inconnue'

99_check.xml View (436 Bytes) Joël Cuissinat, 11/04/2014 04:13 PM

Associated revisions

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

Check avec variable inexistante

  • creole/var_loader.py : message explicite sur le raise

Fixes #9495 @20m

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

Ajout des traductions sur les exceptions ajoutées

Ref: #9495 @5m
Ref: #9461 @5m

History

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

  • Status changed from Nouveau to En cours
  • Assigned To set to Joël Cuissinat
  • Start date set to 11/10/2014

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

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

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

  • Remaining (hours) changed from 1.0 to 0.15

#4 Updated by Fabrice Barconnière over 6 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.15 to 0.0

OK

root@eolebase:~# creoled --debug
creoled - Chargement de la configuration tiramisu
creoled - Set umask to 0022
creoled - Impossible de charger la configuration Creole.Variable var_inconnue inexistante utilisée en paramètre d'un check.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/creole-2.0-py2.7.egg/creole/server.py", line 199, in reload_config
    try_upgrade=False)
  File "/usr/local/lib/python2.7/dist-packages/creole-2.0-py2.7.egg/creole/loader.py", line 287, in creole_loader
    loader.read_dir(dirs, namespace)
  File "/usr/local/lib/python2.7/dist-packages/creole-2.0-py2.7.egg/creole/var_loader.py", line 983, in read_dir
    self._gen_descr(namespace)
  File "/usr/local/lib/python2.7/dist-packages/creole-2.0-py2.7.egg/creole/var_loader.py", line 1442, in _gen_descr
    self._gen_consistencies(namespace)
  File "/usr/local/lib/python2.7/dist-packages/creole-2.0-py2.7.egg/creole/var_loader.py", line 1122, in _gen_consistencies
    raise Exception(_(u"Check using unexistent variable {0} as parameter.").format(dvname))
Exception: Variable var_inconnue inexistante utilisée en paramètre d'un check.

Also available in: Atom PDF