10-17-2017 11:52 PM
HI All
I'm using YDK 0.5.2 and I want to find a way to close a session safely.
I know that I can use close() to close a session, but when I call close() after a session has been closed, there will be a exception.
Is there a way to get the session status in version 0.5.2? If the session is still open, then I can close it.
And is there a way to find the document for older version of YDK?
Thanks
Solved! Go to Solution.
10-18-2017 09:24 AM
Hi Haoyu,
Currently, we do not have a way to get the status of the session.
To generate the documentation for 0.5.2, you can do a git checkout of the 0.5.2 tag and run generate.py.
git clone https://github.com/ciscodevnet/ydk-gen.git -b 0.5.2
cd ydk-gen
python generate.py --core --generate-doc
cd gen-api/python/ydk/docs_expanded/ # documents will be generated here
To handle such an exception that you are seeing, could you make use of a try/except block or some other python construct?
10-18-2017 09:24 AM
Hi Haoyu,
Currently, we do not have a way to get the status of the session.
To generate the documentation for 0.5.2, you can do a git checkout of the 0.5.2 tag and run generate.py.
git clone https://github.com/ciscodevnet/ydk-gen.git -b 0.5.2
cd ydk-gen
python generate.py --core --generate-doc
cd gen-api/python/ydk/docs_expanded/ # documents will be generated here
To handle such an exception that you are seeing, could you make use of a try/except block or some other python construct?
10-18-2017 07:42 PM
Thanks for your help. I will use try/except to deal with this case.
10-19-2017 05:12 PM
Note that as of 0.6.0, no explicit close is needed anymore.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide