Skip to content

Commit

Permalink
small tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Oct 29, 2023
1 parent fb102d8 commit 916847a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tmtccmd/cfdp/handler/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,16 +943,15 @@ def _get_next_transfer_seq_num(self):
def _declare_fault(self, cond: ConditionCode):
fh = self.cfg.default_fault_handlers.get_fault_handler(cond)
transaction_id = self._params.transaction_id
progress = self._params.fp.progress
assert transaction_id is not None
if fh == FaultHandlerCode.NOTICE_OF_CANCELLATION:
self._notice_of_cancellation(cond)
elif fh == FaultHandlerCode.NOTICE_OF_SUSPENSION:
self._notice_of_suspension()
elif fh == FaultHandlerCode.ABANDON_TRANSACTION:
self._abandon_transaction()
self.cfg.default_fault_handlers.report_fault(
transaction_id, cond, self._params.fp.progress
)
self.cfg.default_fault_handlers.report_fault(transaction_id, cond, progress)

def _notice_of_cancellation(self, condition_code: ConditionCode):
# CFDP standard 4.11.2.2.3: Any fault declared in the course of transferring
Expand Down

0 comments on commit 916847a

Please sign in to comment.