X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fport.py;h=4ba59f066df4c230e4b3ef92389f1ae7b50ad102;hp=f7c236692e23d35951c00b85375ef58a887d9831;hb=d24d56638469189904fb6ddbb3c725817b3e9417;hpb=15caa1ca4fac30bd196602bd136e48fda3892de2 diff --git a/src/bindings/python/bt2/bt2/port.py b/src/bindings/python/bt2/bt2/port.py index f7c23669..4ba59f06 100644 --- a/src/bindings/python/bt2/bt2/port.py +++ b/src/bindings/python/bt2/bt2/port.py @@ -32,7 +32,7 @@ def _create_from_ptr_and_get_ref(ptr, port_type): cls = _PORT_TYPE_TO_PYCLS.get(port_type, None) if cls is None: - raise bt2.Error('unknown port type: {}'.format(port_type)) + raise TypeError('unknown port type: {}'.format(port_type)) return cls._create_from_ptr_and_get_ref(ptr) @@ -41,7 +41,7 @@ def _create_self_from_ptr_and_get_ref(ptr, port_type): cls = _PORT_TYPE_TO_USER_PYCLS.get(port_type, None) if cls is None: - raise bt2.Error('unknown port type: {}'.format(port_type)) + raise TypeError('unknown port type: {}'.format(port_type)) return cls._create_from_ptr_and_get_ref(ptr)