mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix zero division error
This commit is contained in:
parent
c237434ad6
commit
cec7adab1c
1 changed files with 4 additions and 1 deletions
|
|
@ -126,7 +126,10 @@ def convert_to_fps(source_value):
|
|||
divident
|
||||
)
|
||||
)
|
||||
return float(divident) / float(divisor)
|
||||
divisor_float = float(divisor)
|
||||
if divisor_float == 0.0:
|
||||
raise InvalidFpsValue("Can't divide by zero")
|
||||
return float(divident) / divisor_float
|
||||
|
||||
raise InvalidFpsValue(
|
||||
"Value can't be converted to number \"{}\"".format(source_value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue