Sets info values of an open section references should be a dictionary with the
Sets info values of an open section references should be a dictionary with the
...
@@ -575,6 +592,16 @@ class Section(object):
...
@@ -575,6 +592,16 @@ class Section(object):
else:
else:
vals.append(section)
vals.append(section)
defget_value(self,metaInfo):
ifmetaInfo.nameinself.simple_values:
returnself.simple_values[metaInfo.name]
elifmetaInfo.nameinself.array_values:
returnself.array_values[metaInfo.name]
raiseKeyError(metaInfo.name)
defget_subsections(self,metaInfo):
returnself.subsections[metaInfo.name]
classSectionManager(object):
classSectionManager(object):
"""Manages the sections for the given metainfo.
"""Manages the sections for the given metainfo.
...
@@ -655,6 +682,27 @@ class SectionManager(object):
...
@@ -655,6 +682,27 @@ class SectionManager(object):
except (KeyError,IndexError):
except (KeyError,IndexError):
raiseException("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))
raiseException("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))