Handle.new convenience methodfunctools.wraps backend functions in Handle.c*check_stack/inspect.stack()?Follow-up to #1388
https://github.com/SyneRBI/SIRF/pull/1390
(5 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@casperdcl pushed 3 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@KrisThielemans approved this pull request.
ok, but now might be a good time to add a little bit of documentation on the Handle class (and indeed the new HANDLE. It is an implementation detail (should we call it _Handle in Python tradition?), but developers do need to know how this works :-)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@casperdcl commented on this pull request.
> @@ -36,7 +37,7 @@
class Handle:
def __init__(self, handle, check_stack: int | None = None):
if (check_stack is None or check_stack >= 0) and pyiutil.executionStatus(handle) != 0:
- check_stack = inspect.stack()[1 if check_stack is None else check_stack]
+ check_stack = inspect.stack()[1 if check_stack is None else check_stack] # TODO: delete or print this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@evgueni-ovtchinnikov commented on this pull request.
> @@ -36,7 +37,7 @@
class Handle:
def __init__(self, handle, check_stack: int | None = None):
if (check_stack is None or check_stack >= 0) and pyiutil.executionStatus(handle) != 0:
- check_stack = inspect.stack()[1 if check_stack is None else check_stack]
+ check_stack = inspect.stack()[1 if check_stack is None else check_stack] # TODO: delete or print this?
delete unused lines 40-43 please (not much help anyway as the error may be higher up the stack than level 1)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@evgueni-ovtchinnikov commented on this pull request.
> @@ -36,7 +37,7 @@
class Handle:
def __init__(self, handle, check_stack: int | None = None):
if (check_stack is None or check_stack >= 0) and pyiutil.executionStatus(handle) != 0:
- check_stack = inspect.stack()[1 if check_stack is None else check_stack]
+ check_stack = inspect.stack()[1 if check_stack is None else check_stack] # TODO: delete or print this?
Re the purpose of inspect.stack: what I wanted was to get closer to the line that throws monkey wrench.
For example: running PET demos I get
`Error opening file acf.hs\n' exception caught at line 427 of /home/sirfuser/devel/buildVM/sources/SIRF/src/xSTIR/cSTIR/cstir.cpp
but actual failure happens in STIR function ProjData::read_from_file called either at line 694 or line 852 of SIRF's stir_data_containers.h depending on the storage scheme (file or memory).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@casperdcl pushed 3 commits.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()