automatically register subclasses of AsynConn

using __init_subclass__ method.

+ correct typo

Change-Id: I9a57c467efcd138651248f92fbf84195624e0b9a
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/27093
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2021-11-10 13:21:44 +01:00
parent 47d09e9b08
commit ad7cfe4ea0
2 changed files with 9 additions and 9 deletions

View File

@ -98,7 +98,7 @@ def clamp(_min, value, _max):
def get_class(spec):
"""loads a class given by string in dotted notaion (as python would do)"""
"""loads a class given by string in dotted notation (as python would do)"""
modname, classname = spec.rsplit('.', 1)
if modname.startswith('secop'):
module = importlib.import_module(modname)