fix importing AsynCon without serial
importing HasIO without serial being installed fails, as the import guard sets Serial to None, which is then called for AsyncSerials SETTINGS attribute Change-Id: I94a9eb5c2ff8de1a1b31f31700358d5d2226eadd Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30700 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Alexander Zaft <a.zaft@fz-juelich.de>
This commit is contained in:
parent
9755040ac2
commit
31b1a916f5
@ -233,7 +233,7 @@ class AsynSerial(AsynConn):
|
||||
scheme = 'serial'
|
||||
PARITY_NAMES = {name[0]: name for name in ['NONE', 'ODD', 'EVEN', 'MARK', 'SPACE']}
|
||||
ARG_SEP = re.compile('[+&]') # allow + or & as options separator in uri
|
||||
SETTINGS = set(Serial(None).get_settings()) # keys of valid Serial settings
|
||||
SETTINGS = set(Serial(None).get_settings()) if Serial else None # keys of valid Serial settings
|
||||
|
||||
def __init__(self, uri, *args, **kwargs):
|
||||
if Serial is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user