diff --git a/simple_vm_client/openstack_connector/openstack_connector.py b/simple_vm_client/openstack_connector/openstack_connector.py index d596c4e..12abb04 100644 --- a/simple_vm_client/openstack_connector/openstack_connector.py +++ b/simple_vm_client/openstack_connector/openstack_connector.py @@ -1214,8 +1214,12 @@ def _remove_security_groups_from_server(self, server: Server) -> None: and not self.is_security_group_in_use(security_group_id=sec.id) ): logger.info(f"Delete security group {sec}") - - self.openstack_connection.delete_security_group(sec) + try: + self.openstack_connection.delete_security_group(sec) + except ResourceNotFound: + logger.info( + f"Could not remoeve security group {sec.id} from server" + ) def _validate_server_for_deletion(self, server: Server) -> None: task_state = server.task_state