X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rest%2Fcreate.py;h=e3b8e4db65b38f8b64385fd3ed997f25b1998785;hb=416b12a90d6a2ec3a1801d37a28ce1e5ffd8a58d;hp=afb62b7470cabfcc9dced2c45cfd5ee58b91d885;hpb=11b83a3dc742c2f139c67ced00dcca10713a9602;p=myslice.git diff --git a/rest/create.py b/rest/create.py index afb62b74..e3b8e4db 100644 --- a/rest/create.py +++ b/rest/create.py @@ -23,8 +23,7 @@ def dispatch(request, object_type, object_name): elif request.method == 'GET': #return error('only post request is supported') req_items = request.GET - print req_items - for el in req_items.items(): + for el in list(req_items.items()): # Filters not used for create if el[0].startswith('filters'): o.filters[el[0][8:-1]] = el[1] @@ -44,6 +43,6 @@ def dispatch(request, object_type, object_name): else : return error('an error has occurred') - except Exception, e: + except Exception as e: return error(str(e))