network/module_utils
Thomas Haller c2e83b1d82 argval: use callable() check in get_default_value()
Previously, we would catch any kind of exception. We only want
to suppress an error if the default value is not a callable
(but instead a plain value).

Usually, in python they say it's easier to ask for forgiveness
than permission. However, that is often not true (the code here
this case becomes simpler, not more complicated). But more important,
in this case we only get a TypeError, which doesn't exactly tell
us what is wrong. We want to only suppress the error, if the
instance is not callable.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2021-04-16 12:09:43 +02:00
..
network_lsr argval: use callable() check in get_default_value() 2021-04-16 12:09:43 +02:00
__init__.py Add Pytest integration tests 2020-08-24 21:52:25 +02:00