Skip to content
Snippets Groups Projects
Commit 5d398438 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

I dont' remember what.

parent b95a0dc2
Branches
Tags
No related merge requests found
......@@ -7,7 +7,8 @@ logger = logging.getLogger(__name__)
#===============================================================================
class LocalBackend(object):
"""A backend that outputs results into a regular python dictionary.
"""A backend that outputs results into a regular python dictionary. This is
useful if you wan't to run the parser with python only.
"""
def __init__(self, metaInfoEnv, fileOut=StringIO.StringIO(), debug=True):
self.__metaInfoEnv = metaInfoEnv
......@@ -218,6 +219,8 @@ class Results(object):
result.append(data_list)
if len(result) == 1:
return result[0]
elif len(result) == 0:
raise LookupError("Could not find a parsing result for '{}'. The parser did not output this value.".format(metaname))
else:
return np.array(result)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment