From a7ba12d7542fe5d1dc9d05938c79dcd23a23cd3e Mon Sep 17 00:00:00 2001 From: Antony Chazapis Date: Fri, 20 Jan 2012 20:57:01 +0200 Subject: [PATCH] Put back newlines in Conflict responses. --- pithos/api/functions.py | 8 ++++---- pithos/api/util.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pithos/api/functions.py b/pithos/api/functions.py index 8f79da7..0dfb1ce 100644 --- a/pithos/api/functions.py +++ b/pithos/api/functions.py @@ -853,13 +853,13 @@ def object_write(request, v_account, v_container, v_object): except NotAllowedError: raise Forbidden('Not allowed') except IndexError, e: - raise Conflict('\n'.join(e.data)) + raise Conflict('\n'.join(e.data) + '\n') except NameError: raise ItemNotFound('Container does not exist') except ValueError: raise BadRequest('Invalid sharing header') except AttributeError, e: - raise Conflict('\n'.join(e.data)) + raise Conflict('\n'.join(e.data) + '\n') except QuotaError: raise RequestEntityTooLarge('Quota exceeded') if 'ETag' not in meta: @@ -1044,7 +1044,7 @@ def object_update(request, v_account, v_container, v_object): except ValueError: raise BadRequest('Invalid sharing header') except AttributeError, e: - raise Conflict('\n'.join(e.data)) + raise Conflict('\n'.join(e.data) + '\n') if public is not None: try: request.backend.update_object_public(request.user_uniq, v_account, @@ -1190,7 +1190,7 @@ def object_update(request, v_account, v_container, v_object): except ValueError: raise BadRequest('Invalid sharing header') except AttributeError, e: - raise Conflict('\n'.join(e.data)) + raise Conflict('\n'.join(e.data) + '\n') except QuotaError: raise RequestEntityTooLarge('Quota exceeded') if public is not None: diff --git a/pithos/api/util.py b/pithos/api/util.py index 17bc18a..c9fed29 100644 --- a/pithos/api/util.py +++ b/pithos/api/util.py @@ -320,7 +320,7 @@ def copy_or_move_object(request, src_account, src_container, src_name, dest_acco except ValueError: raise BadRequest('Invalid sharing header') except AttributeError, e: - raise Conflict('\n'.join(e.data)) + raise Conflict('\n'.join(e.data) + '\n') except QuotaError: raise RequestEntityTooLarge('Quota exceeded') if public is not None: -- 1.7.10.4