
For this purposes I added addiitional processing of original exceptions at wsme/wsmeext/pecan.py. For exception's validation special validator was added to wsme/wsmeext/utils.py. Also functionality was reworked to be compatible with python3.3 Fixes bug#1214073 Change-Id: Ib1cd0b274bda11f62298848ebcd55b3f6641757c
12 lines
273 B
Python
12 lines
273 B
Python
"""
|
|
This File consists of utils functions used in wsmeext module.
|
|
"""
|
|
from six.moves import http_client
|
|
|
|
|
|
def is_valid_code(code_value):
|
|
"""
|
|
This function checks if incoming value in http response codes range.
|
|
"""
|
|
return code_value in http_client.responses
|