projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bt2: print actual and expected lengths in _StaticArrayField._set_value error message
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
field.py
diff --git
a/src/bindings/python/bt2/bt2/field.py
b/src/bindings/python/bt2/bt2/field.py
index fbe609eedb473377a3a16ff55ac4091540626bc0..275d500d6fdd4c11e7a4456b602249c788cb89d3 100644
(file)
--- a/
src/bindings/python/bt2/bt2/field.py
+++ b/
src/bindings/python/bt2/bt2/field.py
@@
-855,7
+855,11
@@
class _StaticArrayField(_StaticArrayFieldConst, _ArrayField, _Field):
def _set_value(self, values):
if len(self) != len(values):
def _set_value(self, values):
if len(self) != len(values):
- raise ValueError('expected length of value and array field to match')
+ raise ValueError(
+ 'expected length of value ({}) and array field ({}) to match'.format(
+ len(values), len(self)
+ )
+ )
for index, value in enumerate(values):
if value is not None:
for index, value in enumerate(values):
if value is not None:
This page took
0.022738 seconds
and
4
git commands to generate.