Subscribe

Python NaElement sys.exit

It appears there is sys.exit() being called from within the NaElement.py, at various places, L317, 234, 260...

 

I find that 'very disturbing' Smiley Happy but would like to hear opinions and reasoning behind that coding decision.

 

I expect apis not to sys.exit on its own. Do throw an 'normal' exception, return false, but please do not sys.exit ...

 

Users may be calling NaElement from their server/daemon processes and they may not expect such strong exception to be thrown from within the api

 

I know the sys.exit is ultimately an exception, but our sdk users may not be aware we throw such strong exception which cannot be caught by normal 'except Exception as e'...

https://docs.python.org/2/library/exceptions.html#exceptions.SystemExit

 

But I may be missing something, thus the post here...

 

Thanks

 

Robert

Re: Python NaElement sys.exit

Hello Robert,

 

I wanted to take a moment to let you, and the community, know that your questions are not being ignored.  I'm working with the product management for NMSDK to discover the answers to your questions.  I have also asked some of our more experienced developers if they have any thoughts on the matter.

 

 

Finally, thank you for your excellent question.  We want NMSDK to be as good as possible, even if that means asking hard questions sometimes!  Please feel free to reach out to me at any time if I can help.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Python NaElement sys.exit

Hi @RobertSimac,

 

Wanted to give you an update...a BURT (#1066094) has been created to address this issue.  Please reach out if there's anything I can do!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.