The Issue
We should be more robust against custom digests that do not exist in the hashlib module. For instance, this is a bad example because it is related to a template, but to see the current behavior:
2018-07-06 10:52:52 1139 123145491992576 ERROR nxdrive.engine.processor Unknown error Traceback (most recent call last): File "nxdrive/engine/processor.pyc", line 248, in _execute File "nxdrive/engine/processor.pyc", line 1000, in _synchronize_remotely_created File "nxdrive/engine/processor.pyc", line 1055, in _create_remotely File "nxdrive/engine/processor.pyc", line 834, in _download_content File "nxdrive/client/remote_file_system_client.pyc", line 115, in stream_content Exception: Unknown digest algorithm for notInBinaryStore 2018-07-06 10:52:52 1139 123145491992576 DEBUG nxdrive.engine.workers Increasing error [SYNC_HANDLER__synchronize_remotely_created] ("Exception(u'Unknown digest algorithm for notInBinaryStore',)") for <StateRow[8] local_path=u'/.../body.html', remote_ref=u'defaultFileSystemItemFactory#default#xxx', local_state=u'unknown', remote_state=u'created', pair_state=u'remotely_created', filter_path=None>
This will end on an unknown error in the error window. Not really helpful.
The Fix
Raise a custom exception and put the document in error with a clair message.
- depends on
-
NXPY-69 Split the get_digester() function in two
- Resolved
- is related to
-
NXDRIVE-1885 Ignore files with the 'notInBinaryStore' digest
- Resolved
-
NXP-25841 Ignore files not present in binary store
- Resolved