Fixes for UDC Default State robot unload and panda PCAP path provider setting#1669
Fixes for UDC Default State robot unload and panda PCAP path provider setting#1669
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1669 +/- ##
=======================================
Coverage 92.94% 92.94%
=======================================
Files 157 157
Lines 8586 8591 +5
=======================================
+ Hits 7980 7985 +5
Misses 606 606
🚀 New features to boost your workflow:
|
jacob720
left a comment
There was a problem hiding this comment.
Looks good, just the one question
|
|
||
| yield from bps.wait_for([set_panda_dir]) | ||
| futures = yield from bps.wait_for([set_panda_dir]) | ||
| return futures[0].result() |
There was a problem hiding this comment.
Why does this result need to be returned? I can't see that it's used anywhere else in the code. Also set_panda_dir doesn't return anything so won't the result be None? Or is this for error propegation
There was a problem hiding this comment.
bps.wait_for() returns a set of futures, meaning that the result of the tasks (and therefore any exception) is not returned directly instead it is captured.
If you don't fetch the result then if an exception happened we can't find out about it.
The return is just syntactic sugar that shuts up the type-checking.
Fixes
Link to dodal PR (if required):
(remember to update
pyproject.tomlwith the dodal commit tag if you need it for tests to pass!)Instructions to reviewer on how to test:
Checks for reviewer