Skip to content

Commit 2679916

Browse files
author
malaval
authored
Minor edit after pull request merge
1 parent 0c94361 commit 2679916

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

common.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ def validate_partitions(data):
8585
assert re.match('^[a-zA-Z0-9]+$', partition['PartitionName']), 'root["Partitions"][%s]["PartitionName"] does not match ^[a-zA-Z0-9]+$' %i_partition
8686

8787
assert 'NodeGroups' in partition, 'Missing "NodeGroups" in root["Partitions"][%s]' %i_partition
88-
if 'PartitionOptions' in partition:
89-
assert isinstance(partition['PartitionOptions'], dict), 'root["Paritions"][%s]["PartitionOptions"] is not a dict' %(i_partition)
9088
assert isinstance(partition['NodeGroups'], list), 'root["Partitions"][%s]["NodeGroups"] is not an array' %i_partition
9189

9290
for i_nodegroup, nodegroup in enumerate(partition['NodeGroups']):
@@ -112,8 +110,11 @@ def validate_partitions(data):
112110

113111
assert 'SubnetIds' in nodegroup, 'Missing "SubnetIds" in root["Partitions"][%s]["NodeGroups"][%s]' %(i_partition, i_nodegroup)
114112
assert isinstance(nodegroup['SubnetIds'], list), 'root["Partitions"][%s]["NodeGroups"][%s]["SubnetIds"] is not a dict' %(i_partition, i_nodegroup)
115-
116113

114+
if 'PartitionOptions' in partition:
115+
assert isinstance(partition['PartitionOptions'], dict), 'root["Partitions"][%s]["PartitionOptions"] is not a dict' %(i_partition)
116+
117+
117118
# Create and return logger, config, and partitions variables
118119
def get_common(scriptname):
119120

0 commit comments

Comments
 (0)