Skip to content

Commit

Permalink
Merge branch 'fractures' of bitbucket.org:keilegavlen/gridding into f…
Browse files Browse the repository at this point in the history
…ractures
  • Loading branch information
Runar committed Mar 17, 2017
2 parents 3fe94f9 + dee2df4 commit 7510ecf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions grid_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,16 @@ def add_node_prop(self, key, g=None, prop=None):
Should be either a list with the same length as g, or a single
item which is assigned to all nodes. Defaults to None.
Raises:
ValueError if the key is 'node_number', this is reserved for other
purposes. See self.assign_node_ordering() for details.
"""

# Check that the key is not 'node_number' - this is reserved
if key == 'node_number':
raise ValueError('Node number is a reserved key, stay away')

# Do some checks of parameters first
if g is None:
assert prop is None or not isinstance(prop, list)
Expand Down

0 comments on commit 7510ecf

Please sign in to comment.