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
=== modified file 'ubuntuone/storageprotocol/client.py'
--- ubuntuone/storageprotocol/client.py 2009-09-09 18:51:28 +0000
+++ ubuntuone/storageprotocol/client.py 2009-10-16 17:05:18 +0000
@@ -1041,12 +1041,8 @@
1041 if message.type == protocol_pb2.Message.AUTH_AUTHENTICATED:1041 if message.type == protocol_pb2.Message.AUTH_AUTHENTICATED:
1042 self.done()1042 self.done()
1043 elif message.type == protocol_pb2.Message.ERROR:1043 elif message.type == protocol_pb2.Message.ERROR:
1044 if message.error.type == protocol_pb2.Error.AUTHENTICATION_FAILED:1044 # as the error travels with the exception, we send all here
1045 self.error(request.StorageProtocolError(1045 self.error(request.StorageRequestError(self, message))
1046 "Authentication Failed"))
1047 else:
1048 self.error(request.StorageProtocolError(
1049 "Authentication Error:"+str(message)))
1050 else:1046 else:
1051 self.error(request.StorageProtocolError(1047 self.error(request.StorageProtocolError(
1052 "Authentication Error:"+str(message)))1048 "Authentication Error:"+str(message)))

Subscribers

People subscribed via source and target branches