Fixed valueerror in toGrid
This commit is contained in:
parent
0a76f38bb3
commit
9e95a2d75f
2
fred.py
2
fred.py
@ -66,6 +66,8 @@ def toGrid(input, parser=None):
|
||||
FileNotFoundError: If the file cannot be found (if input is a file path).
|
||||
ValueError: If the parser function is invalid.
|
||||
"""
|
||||
if parser is not None and not callable(parser):
|
||||
raise ValueError("The parser must be a callable function.")
|
||||
|
||||
grid = []
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user