Skip to content
Browse files

cluster: add get_cluster_group_or_none

This should have been included in commit fddbe7f

Returns only the cluster's EC2 security group if it exists, None if not.
  • Loading branch information...
1 parent e766fc5 commit ced52d92c128ef7d1c1c6d398a907f085751a705 @jtriley committed
Showing with 6 additions and 0 deletions.
  1. +6 −0 starcluster/
6 starcluster/
@@ -208,6 +208,12 @@ def get_cluster_security_group(self, group_name):
gname = self._get_cluster_name(group_name)
return self.ec2.get_security_group(gname)
+ def get_cluster_group_or_none(self, group_name):
+ try:
+ return self.get_cluster_security_group(group_name)
+ except exception.SecurityGroupDoesNotExist:
+ pass
def get_cluster_security_groups(self):
Return all security groups on EC2 that start with '@sc-'

0 comments on commit ced52d9

Please sign in to comment.
Something went wrong with that request. Please try again.