fixes for uniax device

This commit is contained in:
2021-06-11 16:45:45 +02:00
parent 6c4bb78f97
commit b30bd308a9
11 changed files with 456 additions and 33 deletions

View File

@ -37,4 +37,5 @@ from secop.poller import AUTO, DYNAMIC, REGULAR, SLOW
from secop.properties import Property
from secop.proxy import Proxy, SecNode, proxy_class
from secop.stringio import HasIodev, StringIO
from secop.bytesio import BytesIO
from secop.persistent import PersistentMixin, PersistentParam

View File

@ -251,7 +251,9 @@ class AsynSerial(AsynConn):
if not fullname.startswith(name):
raise ConfigError('illegal parity: %s' % parity)
options['parity'] = name[0]
if 'timeout' not in options:
if 'timeout' in options:
options['timeout'] = float(self.timeout)
else:
options['timeout'] = self.timeout
try:
self.connection = Serial(dev, **options)

View File

@ -92,7 +92,7 @@ class PersistentMixin(HasAccessibles):
try:
with open(self.persistentFile, 'r') as f:
self.persistentData = json.load(f)
except FileNotFoundError:
except Exception:
self.persistentData = {}
writeDict = {}
for pname in self.parameters: