Skip to content

Commit

Permalink
BlockFile: Add block_no property
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Oct 22, 2019
1 parent 37c92c9 commit 9c420dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ogs5py/fileclasses/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ def reset(self):
self.del_main_keyword(del_all=True)
self._update_in()

@property
def block_no(self):
"""Number of blocks in the file."""
return self.get_block_no()

def get_block_no(self):
"""Get the number of blocks in the file."""
return len(self.mainkw)
Expand Down

0 comments on commit 9c420dd

Please sign in to comment.