run-unit-tests on ykush devices - #12561
Conversation
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| device = Acroname() |
There was a problem hiding this comment.
I say lets call it acroname (lower case) and not device as we call our cameras devices
|
In general:
I think the direction is good, but maybe the 'relay' (I like 'hub' better) is your interface that acroname and ykush implement? You still need a create() function, but that's about it. Once you have a hub instance (that's your |
ykush and acroname are now inherting from usb_relay attempting to support functionality even when the hub is connected to other usb hub
…ice_hub, relay->hub
| return None | ||
| except acroname.NoneFoundError(): | ||
| return None | ||
| except: |
There was a problem hiding this comment.
This is not valid, I get:
TypeError: catching classes that do not inherit from BaseException is not allowed
It should be:
except BaseException:
Same in line 176.
| return acroname.Acroname() | ||
| except ModuleNotFoundError: | ||
| return None | ||
| except acroname.NoneFoundError(): |
| @@ -41,321 +41,328 @@ def usage(): | |||
| log.w( 'No acroname library is available!' ) | |||
There was a problem hiding this comment.
I think this is now less relevant now that there're alternatives - let's turn this into a log.d
There was a problem hiding this comment.
And make it lower-case and remove the ! :)
There was a problem hiding this comment.
sure, I'll do the same on ykush.py (log.w -> log.d)
Tracked on [LRS-991]