projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.gitignore: add some more IDE / tools related file
[babeltrace.git]
/
src
/
bindings
/
python
/
bt2
/
bt2
/
utils.py
diff --git
a/src/bindings/python/bt2/bt2/utils.py
b/src/bindings/python/bt2/bt2/utils.py
index 849c7a3c2af099b78a5ab516038528ef54c39d01..fc6d24ce79d8b9c4915238b87ed3f7205c97b63f 100644
(file)
--- a/
src/bindings/python/bt2/bt2/utils.py
+++ b/
src/bindings/python/bt2/bt2/utils.py
@@
-2,10
+2,10
@@
#
# Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
#
# Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
-import bt2
+
+from bt2 import error as bt2_error
from bt2 import logging as bt2_logging
from bt2 import native_bt
from bt2 import logging as bt2_logging
from bt2 import native_bt
-from bt2 import error as bt2_error
class UnknownObject(Exception):
class UnknownObject(Exception):
@@
-141,30
+141,27
@@
def _handle_func_status(status, msg=None):
if status == native_bt.__BT_FUNC_STATUS_ERROR:
assert msg is not None
if status == native_bt.__BT_FUNC_STATUS_ERROR:
assert msg is not None
- raise bt2._Error(msg)
+ raise bt2
_error
._Error(msg)
elif status == native_bt.__BT_FUNC_STATUS_MEMORY_ERROR:
assert msg is not None
elif status == native_bt.__BT_FUNC_STATUS_MEMORY_ERROR:
assert msg is not None
- raise bt2._MemoryError(msg)
+ raise bt2
_error
._MemoryError(msg)
elif status == native_bt.__BT_FUNC_STATUS_END:
if msg is None:
elif status == native_bt.__BT_FUNC_STATUS_END:
if msg is None:
- raise
bt2.
Stop
+ raise Stop
else:
else:
- raise
bt2.
Stop(msg)
+ raise Stop(msg)
elif status == native_bt.__BT_FUNC_STATUS_AGAIN:
if msg is None:
elif status == native_bt.__BT_FUNC_STATUS_AGAIN:
if msg is None:
- raise
bt2.
TryAgain
+ raise TryAgain
else:
else:
- raise
bt2.
TryAgain(msg)
+ raise TryAgain(msg)
elif status == native_bt.__BT_FUNC_STATUS_OVERFLOW_ERROR:
elif status == native_bt.__BT_FUNC_STATUS_OVERFLOW_ERROR:
- if msg is None:
- raise bt2._OverflowError
- else:
- raise bt2._OverflowError(msg)
+ raise _OverflowError(msg)
elif status == native_bt.__BT_FUNC_STATUS_UNKNOWN_OBJECT:
if msg is None:
elif status == native_bt.__BT_FUNC_STATUS_UNKNOWN_OBJECT:
if msg is None:
- raise
bt2.
UnknownObject
+ raise UnknownObject
else:
else:
- raise
bt2.
UnknownObject(msg)
+ raise UnknownObject(msg)
else:
assert False
else:
assert False
This page took
0.035344 seconds
and
4
git commands to generate.