Skip to content
Snippets Groups Projects
Commit b42d23ac authored by Florian Obersteiner's avatar Florian Obersteiner
Browse files

added parser for REVISION keyword to Dataset.revision property

parent 172fb3b6
No related branches found
No related tags found
1 merge request!22towards release
......@@ -319,8 +319,7 @@ class StandardNormalComments(collections.UserList):
def __str__(self):
s = "\n".join(f"{str(v)}" for _, v in self.keywords.items())
return s
return "\n".join(f"{str(v)}" for v in self.keywords.values())
class Variable:
......@@ -707,6 +706,10 @@ class Dataset:
rawNcom = [f.readline(doSplit=False) for _ in range(nncom)]
self.normalComments.ingest(rawNcom)
r = self.normalComments.keywords["REVISION"].data
r = "0" if not r else r[0].strip("R")
self.revision = r
self.nHeaderFile = f.line
if self.nHeader != nHeaderSuggested:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment