Skip to content

Commit 8d30a64

Browse files
Merge branch 'sort_setting_values' of github.com:dls-controls/pythonIoc into sort_setting_values
2 parents 7f6ccd3 + a7dc10b commit 8d30a64

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

softioc/device.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,8 @@ def _value_to_epics(self, value):
404404
# Note that the trailing null is needed to work around problems with
405405
# some clients.
406406
value = numpy.frombuffer(value + b'\0', dtype = numpy.uint8)
407-
408-
# Truncate value to fit
409-
if hasattr(self, '_nelm'):
410-
value = value[:self._nelm]
407+
# Ensure string isn't too long to fit into waveform
408+
assert len(value) <= self._nelm, 'Value too long for waveform'
411409
return value
412410

413411
def _epics_to_value(self, value):

0 commit comments

Comments
 (0)