update to setparams check to avoid python3 errors, and fix to ipprefix

This commit is contained in:
bharnden 2019-06-02 22:53:39 -07:00
parent 40176e861d
commit db9d13aff8
2 changed files with 5 additions and 2 deletions

View file

@ -141,8 +141,11 @@ class CoreInterface(object):
:return: True if parameter changed, False otherwise
"""
# treat None and 0 as unchanged values
if value is None or value <= 0:
return False
current_value = self._params.get(key)
if value is None or current_value == value or current_value <= 0 and value <= 0:
if current_value is not None and current_value == value:
return False
self._params[key] = value