diff --git a/VirtualMachineService/VirtualMachineHandler.py b/VirtualMachineService/VirtualMachineHandler.py index 3d4aa25d..3c6be81e 100644 --- a/VirtualMachineService/VirtualMachineHandler.py +++ b/VirtualMachineService/VirtualMachineHandler.py @@ -1907,16 +1907,15 @@ def add_udp_security_group(self, server_id): server.name + "_udp" ) ) - server_security_groups=self.conn.list_server_security_groups(server) + server_security_groups = self.conn.list_server_security_groups(server) for sg in server_security_groups: - if sg["name"] == server.name + "_udp": - LOG.info( - "UDP Security group with name {} already added to server.".format( - server.name + "_udp" - ) - ) - return True - + if sg["name"] == server.name + "_udp": + LOG.info( + "UDP Security group with name {} already added to server.".format( + server.name + "_udp" + ) + ) + return True self.conn.compute.add_security_group_to_server( server=server_id, security_group=sec