Merge lp:~facundo/ubuntuone-storage-protocol/discriminate_auth_error into lp:ubuntuone-storage-protocol

Proposed by Facundo Batista on 2009-10-16
Status: Merged
Approved by: dobey on 2009-10-16
Approved revision: 73
Merged at revision: not available
Proposed branch: lp:~facundo/ubuntuone-storage-protocol/discriminate_auth_error
Merge into: lp:ubuntuone-storage-protocol
Diff against target: 18 lines
1 file modified
ubuntuone/storageprotocol/client.py (+2/-6)
To merge this branch: bzr merge lp:~facundo/ubuntuone-storage-protocol/discriminate_auth_error
Reviewer Review Type Date Requested Status
dobey (community) Approve on 2009-10-16
John Lenton 2009-10-16 Approve on 2009-10-16
Review via email: mp+13489@code.launchpad.net

Commit message

In case of receiving an ERROR, we raise StorageRequestError with what we received.

To post a comment you must log in.
Facundo Batista (facundo) wrote :

In case of receiving an ERROR, we raise StorageRequestError with what we received.

Before, it was masked/confused in a StorageProtocolError.

John Lenton (chipaca) wrote :

Awesome.

review: Approve
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/storageprotocol/client.py'
2--- ubuntuone/storageprotocol/client.py 2009-09-09 18:51:28 +0000
3+++ ubuntuone/storageprotocol/client.py 2009-10-16 17:05:18 +0000
4@@ -1041,12 +1041,8 @@
5 if message.type == protocol_pb2.Message.AUTH_AUTHENTICATED:
6 self.done()
7 elif message.type == protocol_pb2.Message.ERROR:
8- if message.error.type == protocol_pb2.Error.AUTHENTICATION_FAILED:
9- self.error(request.StorageProtocolError(
10- "Authentication Failed"))
11- else:
12- self.error(request.StorageProtocolError(
13- "Authentication Error:"+str(message)))
14+ # as the error travels with the exception, we send all here
15+ self.error(request.StorageRequestError(self, message))
16 else:
17 self.error(request.StorageProtocolError(
18 "Authentication Error:"+str(message)))

Subscribers

People subscribed via source and target branches