Skip to content

Commit

Permalink
Merge pull request #788 from onkelandy/avdevice
Browse files Browse the repository at this point in the history
AVDevice Plugin: Fix dependency function for int/float values
  • Loading branch information
onkelandy committed Aug 2, 2023
2 parents c7bc765 + b75576b commit 9d9ded0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avdevice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ def _checkdependency(self, dep_function, dep_type):
expectedvalue = eval(expectedvalue.lstrip('0'))
except Exception:
pass
if type(dependvalue) == type(expectedvalue):
if type(dependvalue) == type(expectedvalue) or (isinstance(dependvalue, (int,float)) and isinstance(expectedvalue, (int,float))):
groupcount[group] += 1 if (dependvalue == expectedvalue and compare == '==') or \
(dependvalue >= expectedvalue and compare == '>=') or \
(dependvalue <= expectedvalue and compare == '<=') or \
Expand Down Expand Up @@ -1256,7 +1256,7 @@ def _checkdependency(self, dep_function, dep_type):
self.logger.log(VERBOSE2,
"Checking Dependency {}: Expectedvalue after Translation {}. Dependitem: {}, expected {}".format(
self._name, expectedvalue, dependitem, expectedvalue))
if type(dependvalue) == type(expectedvalue):
if type(dependvalue) == type(expectedvalue) or (isinstance(dependvalue, (int,float)) and isinstance(expectedvalue, (int,float))):
groupcount[group] += 1 if (dependvalue == expectedvalue and compare == '==') or \
(dependvalue >= expectedvalue and compare == '>=') or \
(dependvalue <= expectedvalue and compare == '<=') or \
Expand Down

0 comments on commit 9d9ded0

Please sign in to comment.