

def handle(self, request, context):
    url = reverse('horizon:project:network_policy:index')
    try:
        if context.get('name'):
            context['name'] = html.escape(context['name'])
        if context.get('description'):
            context['description'] = html.escape(context['description'])
        client.l2policy_create(request, **msg)
        msg = _('L2 Policy Created Successfully!')
        LOG.debug(msg)
        return http.HttpResponseRedirect(url)
    except Exception:
        msg = _('Failed to create L2 policy')
        LOG.error(msg)
        exceptions.handle(request, msg, redirect=shortcuts.redirect)

dataset/ETHPy150Open openstack/group-based-policy-ui/gbpui/panels/network_policy/forms.py AddL2PolicyForm.handle/VarMisuse@84/112 `context`->`msg`