10-23-2018 12:27 AM - edited 03-01-2019 04:13 AM
Hello,
I want to use a leaf type boolean:
leaf active {
type boolean;
}
What is the expected result of the exists() function a leaf of type boolean?
I get a error message "'bool' object has no attribute 'exists'."
That's not what I expect! :(
Regards
Lothar
Solved! Go to Solution.
10-23-2018 12:41 AM
Hi Lothar,
Reading a boolean leaf using maagic will return True or False (native Python type) if the leaf exists.
If it doesn't exist the return value will be None.
/Tomas
10-23-2018 12:41 AM
Hi Lothar,
Reading a boolean leaf using maagic will return True or False (native Python type) if the leaf exists.
If it doesn't exist the return value will be None.
/Tomas
10-24-2018 11:52 PM
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