Commit 73d5309b authored by Daniel Speckhard's avatar Daniel Speckhard

fixed array add values to rewrite values using override flag.

parent e23633c0
from __future__ import print_function from __future__ import print_function
from future import standard_library from future import standard_library
standard_library.install_aliases()
from enum import Enum from enum import Enum
from operator import itemgetter from operator import itemgetter
from builtins import range from builtins import range
from builtins import object from builtins import object
from builtins import str from builtins import str
import numpy as np import numpy as np
import logging
from collections import defaultdict from collections import defaultdict
standard_library.install_aliases()
class ParserEvent(Enum): class ParserEvent(Enum):
"""Enumerations for the different parser events when traversing the """Enumerations for the different parser events when traversing the
...@@ -261,7 +261,6 @@ class LocalBackend(object): ...@@ -261,7 +261,6 @@ class LocalBackend(object):
pass pass
#===============================================================================
class Results(object): class Results(object):
"""A wrapper object for the collection of results gathered by a parser. """A wrapper object for the collection of results gathered by a parser.
""" """
...@@ -433,11 +432,11 @@ class Results(object): ...@@ -433,11 +432,11 @@ class Results(object):
return return
if metatype == "type_section": if metatype == "type_section":
print(level*" " + name + ":") print(level *" " + name + ":")
elif metatype == "type_document_content": elif metatype == "type_document_content":
print(level*" " + name) print(level *" " + name)
elif metatype == "type_dimension": elif metatype == "type_dimension":
print(level*" " + name) print(level *" " + name)
level += 1 level += 1
for child in meta["children"]: for child in meta["children"]:
...@@ -646,7 +645,7 @@ class SectionManager(object): ...@@ -646,7 +645,7 @@ class SectionManager(object):
else: else:
gI = gIndex gI = gIndex
try: try:
self.openSections[gI].addArrayValues(valueMetaInfo, value) self.openSections[gI].addArrayValues(valueMetaInfo, value, **kwargs)
except (KeyError, IndexError): except (KeyError, IndexError):
raise Exception("Cannot add array values for metadata %s to section %d (%d) of %s, as it is not open" % (valueMetaInfo.name, gI, gIndex, self.metaInfo.name)) raise Exception("Cannot add array values for metadata %s to section %d (%d) of %s, as it is not open" % (valueMetaInfo.name, gI, gIndex, self.metaInfo.name))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment