From a50d375c35f65d35a17895b68b1769592adc4e3d Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 7 Jan 2020 22:07:39 +0100 Subject: [PATCH] dgui: fix DirectSlider regression on Python 2 --- direct/src/gui/DirectSlider.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/gui/DirectSlider.py b/direct/src/gui/DirectSlider.py index 037ffcfdf8..c5823a9efc 100644 --- a/direct/src/gui/DirectSlider.py +++ b/direct/src/gui/DirectSlider.py @@ -10,7 +10,7 @@ from panda3d.core import * from . import DirectGuiGlobals as DGG from .DirectFrame import * from .DirectButton import * -from math import isfinite +from math import isnan """ import DirectSlider @@ -91,14 +91,14 @@ class DirectSlider(DirectFrame): # This is the internal function that is called when # self['value'] is directly assigned. value = self['value'] - assert isfinite(value) + assert not isnan(value) self.guiItem.setValue(value) def setValue(self, value): # This is the public function that is meant to be called by a # user that doesn't like to use (or doesn't understand) the # preferred interface of self['value']. - assert isfinite(value) + assert not isnan(value) self['value'] = value def getValue(self):