diff options
author | Victor Shyba <victor1984@riseup.net> | 2016-11-26 18:12:36 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-12-12 09:17:51 -0200 |
commit | fbca1644823acbe4165ad1087db5baed28a6809d (patch) | |
tree | b70dc12bcb8a86221b62b3bab9ab6c817faefdd3 /client | |
parent | d72e3763538d1156bcf72b643626c2111a5a02cf (diff) |
[refactor] improve logging
Some exceptions were missing a proper description and client_side_db.py
script wasn't capturing logs from Twisted.
Diffstat (limited to 'client')
-rw-r--r-- | client/src/leap/soledad/client/http_target/fetch.py | 2 | ||||
-rw-r--r-- | client/src/leap/soledad/client/http_target/fetch_protocol.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/client/src/leap/soledad/client/http_target/fetch.py b/client/src/leap/soledad/client/http_target/fetch.py index 85e2967d..df07a96a 100644 --- a/client/src/leap/soledad/client/http_target/fetch.py +++ b/client/src/leap/soledad/client/http_target/fetch.py @@ -149,7 +149,7 @@ class HTTPDocFetcher(object): return (metadata['number_of_changes'], metadata['new_generation'], metadata['new_transaction_id']) except (ValueError, KeyError): - raise errors.BrokenSyncStream + raise errors.BrokenSyncStream('Metadata parsing failed') def _emit_receive_status(user_data, received_docs, total): diff --git a/client/src/leap/soledad/client/http_target/fetch_protocol.py b/client/src/leap/soledad/client/http_target/fetch_protocol.py index 3322ec70..fa6b1969 100644 --- a/client/src/leap/soledad/client/http_target/fetch_protocol.py +++ b/client/src/leap/soledad/client/http_target/fetch_protocol.py @@ -136,7 +136,7 @@ class DocStreamReceiver(ReadBodyProtocol): Checks that ']' came and stream was properly closed. """ if not self._properly_finished: - raise errors.BrokenSyncStream() + raise errors.BrokenSyncStream('Stream not properly closed') content = self._buffer.getvalue()[0:self._buffer.tell()] self._buffer.close() return content |