forked from Imagelibrary/littlefs
scripts: Removed clearly unused isinf condition in dat parser
This commit is contained in:
@@ -259,9 +259,6 @@ def dat(x):
|
|||||||
# then try as float
|
# then try as float
|
||||||
try:
|
try:
|
||||||
return float(x)
|
return float(x)
|
||||||
# just don't allow infinity or nan
|
|
||||||
if mt.isinf(x) or mt.isnan(x):
|
|
||||||
raise ValueError("invalid dat %r" % x)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ def openio(path, mode='r', buffering=-1):
|
|||||||
else:
|
else:
|
||||||
return open(path, mode, buffering)
|
return open(path, mode, buffering)
|
||||||
|
|
||||||
|
|
||||||
# parse different data representations
|
# parse different data representations
|
||||||
def dat(x):
|
def dat(x):
|
||||||
# allow the first part of an a/b fraction
|
# allow the first part of an a/b fraction
|
||||||
@@ -184,9 +183,6 @@ def dat(x):
|
|||||||
# then try as float
|
# then try as float
|
||||||
try:
|
try:
|
||||||
return float(x)
|
return float(x)
|
||||||
# just don't allow infinity or nan
|
|
||||||
if mt.isinf(x) or mt.isnan(x):
|
|
||||||
raise ValueError("invalid dat %r" % x)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ def dat(x):
|
|||||||
# then try as float
|
# then try as float
|
||||||
try:
|
try:
|
||||||
return float(x)
|
return float(x)
|
||||||
# just don't allow infinity or nan
|
|
||||||
if mt.isinf(x) or mt.isnan(x):
|
|
||||||
raise ValueError("invalid dat %r" % x)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -76,9 +76,6 @@ def dat(x):
|
|||||||
# then try as float
|
# then try as float
|
||||||
try:
|
try:
|
||||||
return float(x)
|
return float(x)
|
||||||
# just don't allow infinity or nan
|
|
||||||
if mt.isinf(x) or mt.isnan(x):
|
|
||||||
raise ValueError("invalid dat %r" % x)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user