From a1bd381cec11c3b2e9610f8a27e61ae6d45634df Mon Sep 17 00:00:00 2001 From: Anindya Roy Date: Wed, 26 Jul 2023 11:48:43 +0530 Subject: [PATCH] updated code 2 --- nxdrive/engine/processor.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nxdrive/engine/processor.py b/nxdrive/engine/processor.py index fea29472a9..ddf5d8e31a 100644 --- a/nxdrive/engine/processor.py +++ b/nxdrive/engine/processor.py @@ -571,19 +571,16 @@ def _synchronize_direct_transfer(self, doc_pair: DocPair, /) -> None: if not path.exists(): self.engine.directTranferError.emit(path) - try: - if not session: - session = self.dao.get_session(doc_pair.session) + if session: log.warning( f"Pausing Direct Transfer of {path!r} because it does not exist. \ Please validate the path and resume." ) self.dao.pause_session(session.uid) - except Exception as e: + else: log.warning( f"Cancelling Direct Transfer of {path!r} because it does not exist." ) - log.warning(f"Error: {e!r}") self._direct_transfer_cancel(doc_pair) return