robshakir / pyangbind

A plugin for pyang that creates Python bindings for a YANG model.
Other
204 stars 121 forks source link

Bool value "FALSE" or "TRUE" is giving exception #235

Closed tejaskumark closed 1 year ago

tejaskumark commented 5 years ago

We need to handle input bool value givean as "FALSE" or "TRUE". Use case when user is taking input from csv, csv may give all uppercase formatting and we end up with exception. Changes required in yangtypes.py as below, class YANGBool(int): false_args = ["false", "False", False, 0, "0", "FALSE"] true_args = ["true", "True", True, 1, "1", "TRUE"]