

def _get_security_group(self, context, id):
    try:
        id = int(context)
        security_group = db.security_group_get(context, id)
    except ValueError:
        msg = _('Security group id should be integer')
        raise exc.HTTPBadRequest(explanation=msg)
    except exception.NotFound as exp:
        raise exc.HTTPNotFound(explanation=unicode(exp))
    return security_group

dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/contrib/security_groups.py SecurityGroupController._get_security_group/VarMisuse@22/27 `id`->`context`