Skip to content

Commit

Permalink
Consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Nov 12, 2013
1 parent e937ffd commit 2a8e3d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nixops/resources/ec2_security_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def create(self, defn, check, allow_reboot, allow_recreate):
if self.state == self.MISSING or self.state == self.UNKNOWN:
self._connect()
try:
self.logger.log("creating EC2 security group `{0}'...".format(self.security_group_name))
self.logger.log("creating EC2 security group {0}...".format(self.security_group_name))
grp = self._conn.create_security_group(self.security_group_name, self.security_group_description)
self.security_group_id = grp.id
except boto.exception.EC2ResponseError as e:
Expand All @@ -146,7 +146,7 @@ def create(self, defn, check, allow_reboot, allow_recreate):
self.state = self.STARTING #ugh

if new_rules:
self.logger.log("adding new rules to EC2 security group `{0}'...".format(self.security_group_name))
self.logger.log("adding new rules to EC2 security group {0}...".format(self.security_group_name))
if grp is None:
self._connect()
grp = self._conn.get_all_security_groups([ self.security_group_name ])[0]
Expand All @@ -158,7 +158,7 @@ def create(self, defn, check, allow_reboot, allow_recreate):
grp.authorize(ip_protocol=rule[0], from_port=rule[1], to_port=rule[2], src_group=src_group)

if old_rules:
self.logger.log("removing old rules from EC2 security group `{0}'...".format(self.security_group_name))
self.logger.log("removing old rules from EC2 security group {0}...".format(self.security_group_name))
if grp is None:
self._connect()
grp = self._conn.get_all_security_groups([ self.security_group_name ])[0]
Expand Down

0 comments on commit 2a8e3d9

Please sign in to comment.