Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions slicops/device/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ def put(self, value):
v = bool(value)
elif self.meta.py_type == int:
v = int(value)
elif self.meta.py_type == float:
v = float(value)
else:
raise AccessorPutError(f"unhandled py_type={self.meta.py_type} {self}")
# ECA_NORMAL == 0 and None is normal, too, apparently
Expand Down
7 changes: 5 additions & 2 deletions slicops/unit_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ def start_ioc(init_yaml, db_yaml=None):
import os, signal, time
import socket

def _path(path, arg):
return path.join(arg) if isinstance(arg, str) else arg

with random_epics_ports():
p = os.fork()
if p == 0:
Expand All @@ -165,8 +168,8 @@ def start_ioc(init_yaml, db_yaml=None):
from pykern import pkunit

ioc.run(
pkunit.data_dir().join(init_yaml),
db_yaml=(pkunit.work_dir().join(db_yaml) if db_yaml else None),
_path(pkunit.data_dir(), init_yaml),
db_yaml=_path(pkunit.work_dir(), db_yaml),
)
except Exception as e:
pkdebug.pkdlog("server exception={} stack={}", e, pkdebug.pkdexc())
Expand Down