Skip to content

Commit

Permalink
small example improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Oct 18, 2024
1 parent 474ae9f commit 3fe8bc9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/cfdp-cli-udp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,18 @@ def _idle_handling(self) -> bool:
f"can only handle put requests target towards {REMOTE_ENTITY_ID} or "
f"{LOCAL_ENTITY_ID}"
)

else:
try:
self.source_handler.put_request(put_req)
return True
except SourceFileDoesNotExist as e:
_LOGGER.warning(
f"can not handle put request, source file {e.file} does not exist"
)
return True
except Empty:
return False
pass
return False

def _busy_handling(self):
# We are getting the packets from a Queue here, they could for example also be polled
Expand Down

0 comments on commit 3fe8bc9

Please sign in to comment.