Enumerating NoneType
cclamb opened this issue · 2 comments
cclamb commented
So there's a bug that seems pretty endemic with respect to enumerating a NoneType. You can see it in search at line 110 (I think i may be a python3 issue?):
Currently in search.py:110: if 'nil' in res.GetOutput():
Fixed with?
ro = res.GetOutput()
if ro is None or 'nil' in res.GetOutput():
Not sure if this is correct though.
jasonmolenda commented
You could try calling res.HasResult() before grabbing the output. If SBCommandReturnObject::GetOutput() is returning None, my guess is that the expression (HandleCommand() call) couldn't be executed for some reason. There's also a SBCommandReturnObject::Succeeded() method.
cclamb commented
That sounds like a better solution (e.g. ::HasOuput()). I'll look at making
these changes and submitting a pull request. ::Succeeded() should likely be
used as well, I'll see where it makes sense.
…On Fri, Jan 4, 2019 at 12:48 PM Jason Molenda ***@***.***> wrote:
You could try calling res.HasResult() before grabbing the output. If
SBCommandReturnObject::GetOutput() is returning None, my guess is that the
expression (HandleCommand() call) couldn't be executed for some reason.
There's also a SBCommandReturnObject::Succeeded() method.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPUh5pnNOp1fMQrcOOzhb872hfnBFitks5u_7AFgaJpZM4ZsG01>
.