Project

General

Profile

Evolution #8356

La fonction calc_classe devrait renvoyer de l'unicode

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

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
Due date:
06/20/2014
% Done:

100%

Estimated time:
0.50 h
Spent time:
Distribution:
EOLE 2.4

Description

Constaté lors du portage du dictionnaire 50_amonecole.xml

root@eolebase:~# CreoleLint -d
 [ ... ]
Traceback (most recent call last):
  File "/usr/bin/CreoleLint", line 55, in main
    validate(keyword, ansi, tmpl)
  File "/usr/lib/python2.7/dist-packages/creole/lint/creolelint.py", line 1069, in validate
    ansi.process(cl)
  File "/usr/lib/python2.7/dist-packages/creole/lint/ansiwriter.py", line 47, in process
    checks = linter.check()
  File "/usr/lib/python2.7/dist-packages/creole/lint/creolelint.py", line 938, in check
    self.load_dics()
  File "/usr/lib/python2.7/dist-packages/creole/lint/creolelint.py", line 145, in load_dics
    self._collect_vars_in_dicos()
  File "/usr/lib/python2.7/dist-packages/creole/lint/creolelint.py", line 232, in _collect_vars_in_dicos
    for path in config.creole.make_dict():
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 459, in make_dict
    force_permissive=force_permissive)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 473, in _make_sub_dict
    force_permissive=force_permissive)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 459, in make_dict
    force_permissive=force_permissive)
  File "/usr/lib/python2.7/dist-packages/tiramisu/config.py", line 476, in _make_sub_dict
    force_permissive=force_permissive)
  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 241, in _getitem
    opt.impl_validate(value, context, 'validator' in setting)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 470, in impl_validate
    do_validation(value, force_index)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 425, in do_validation
    '').format(self._name, err))
ValueError: valeur invalide pour l'option tmp_esu_proxy_bypass : invalide unicode


Related issues

Related to conf-amonecole - Tâche #8347: Création du paquet eole-amonecole-module pour 2.4 Fermé 06/20/2014

Associated revisions

Revision 7d84d845 (diff)
Added by Joël Cuissinat about 6 years ago

Les classes doivent être retournées en unicode

Fixes #8356 @20m

Revision c945597e (diff)
Added by Joël Cuissinat about 6 years ago

Test unitaire pour valider "calc_classe"

Ref #8356 @20m

History

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

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

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

Pour tester :

>>> from creole.eosfunc import calc_classe
>>> calc_classe('255.255.255.0')

doit retourner u'24' et non '24'

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

  • Status changed from Résolu to Fermé

Testé et validé par un test unitaire.

Also available in: Atom PDF