projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib: make packets and packet messages optional, disabled by default
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
stream.py
diff --git
a/src/bindings/python/bt2/bt2/stream.py
b/src/bindings/python/bt2/bt2/stream.py
index 5accfcd0751cfdf271121587b1b6b0d8c73a1ab1..eb780b0ee6ab02c9d0c78ff6502f0037a9593597 100644
(file)
--- a/
src/bindings/python/bt2/bt2/stream.py
+++ b/
src/bindings/python/bt2/bt2/stream.py
@@
-52,6
+52,9
@@
class _Stream(bt2.object._SharedObject):
return id if id >= 0 else None
def create_packet(self):
+ if not self.cls.supports_packets:
+ raise bt2.Error('cannot create packet: stream class does not support packets')
+
packet_ptr = native_bt.packet_create(self._ptr)
if packet_ptr is None:
This page took
0.025762 seconds
and
4
git commands to generate.