Project

General

Profile

Anomalie #7780

Support du type Tiramisu UsernameOption par gen_config

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

Status:
Fermé
Priority:
Haut
Assigned To:
Category:
-
Start date:
Due date:
04/04/2014
% Done:

100%

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

Description

Suite aux modifications liées à #7557, gen_config plante si on utilise le type Creole unix_user (cf. dico joint) :

2014-03-27 15:27:28,210: eolegenconfig - <class 'tiramisu.option.UsernameOption'>
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 60, in categories
    return make_json_response(lib.get_categories(lib.get_id()))
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/lib.py", line 128, in get_categories
    type_ = type_option[type(option)]
KeyError: <class 'tiramisu.option.UsernameOption'>
2014-03-27 15:27:28,215: eolegenconfig - Exception on /categories [GET]
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1504, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1264, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1262, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1248, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python2.7/dist-packages/eoleauthlib/authclient.py", line 145, in decorated_function
    return f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/views.py", line 64, in categories
    return make_error_response(err.message)
  File "/usr/lib/python2.7/dist-packages/eolegenconfig/util.py", line 14, in make_error_response
    resp = make_response(msg)
  File "/usr/lib/python2.7/dist-packages/flask/helpers.py", line 169, in make_response
    return current_app.make_response(args)
  File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1339, in make_response
    return self.response_class.force_type(rv, request.environ)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 711, in force_type
    response = BaseResponse(*_run_wsgi_app(response, environ))
  File "/usr/lib/python2.7/dist-packages/werkzeug/test.py", line 818, in run_wsgi_app
    app_iter = app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 298, in __init__
    super(Option, self).__init__(name, doc, requires, properties)
  File "/usr/lib/python2.7/dist-packages/tiramisu/option.py", line 67, in __init__
    raise ValueError(_("invalid name: {0} for option").format(name))
ValueError: invalid name: {'HTTP_ACCEPT': 'application/json, text/javascript, */*; q=0.01', 'SERVER_PORT': '5000', 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', 'werkzeug.request': <Request 'http://127.0.0.1:5000/genconfig/categories' [GET]>, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'gunicorn/0.13.4', 'SCRIPT_NAME': '/genconfig', 'REMOTE_PORT': '44426', 'wsgi.input': <gunicorn.http.body.Body object at 0x29477d0>, 'REQUEST_METHOD': 'GET', 'HTTP_HOST': '127.0.0.1:5000', 'PATH_INFO': '/categories', 'wsgi.multithread': False, 'QUERY_STRING': '', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_CACHE_CONTROL': 'max-age=0', 'CONTENT_LENGTH': '', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/33.0.1750.152 Chrome/33.0.1750.152 Safari/537.36', 'wsgi.version': (1, 0), 'HTTP_REFERER': 'http://127.0.0.1:5000/genconfig/?application', 'RAW_URI': '/genconfig/categories', 'REMOTE_ADDR': '127.0.0.1', 'wsgi.run_once': False, 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7f2288f11270>, 'wsgi.multiprocess': False, 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'wsgi.url_scheme': 'http', 'gunicorn.socket': <eventlet.greenio.GreenSocket object at 0x281f250>, 'SERVER_NAME': '127.0.0.1', 'CONTENT_TYPE': '', 'wsgi.file_wrapper': <class gunicorn.http.wsgi.FileWrapper at 0x1eb5390>, 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_COOKIE': 'eolegenconfig_session="eolegenconfig:774465df-c73f-471b-9070-ce9354bdbbea!xC4aPyvSV5VnV5OEhgU1kxcI/6k="'} for option

99_user.xml View (343 Bytes) Joël Cuissinat, 03/27/2014 03:29 PM


Related issues

Related to Tiramisu - Anomalie #7557: Le type "unix_user" n'accepte pas les login de 1 caractère Fermé 04/04/2014

History

#1 Updated by Ghislain Loaec over 7 years ago

Normalement, ce commit devrait corriger le problème: creole:7c8e6ce3fcb74c90ae01b6e619a82249d20b181a

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

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

Je confirme que le commit corrige le bug :)

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

  • Status changed from Résolu to Fermé

Testé OK avec les paquets : eole-genconfig 2.4.0-121

Also available in: Atom PDF