def set_raw_perm(self, entity, path, action, policy, exceptions):
        assert entity in RAW_PERM_ENTITIES
        perm = RAW_PERMS[entity]
        assert action in perm.actions
        assert policy in (u'open', u'closed')
        assert not type(exceptions) in types.StringTypes    # forgot the []
        body = json.dumps({u'policy': policy, u'exceptions': exceptions})
        path = u'/permissions/%s/%s' % (perm.path, path)
        if self.debug:
            self.Print(u'%s %s %s' % (path, body, action))
        status, content = self.call(u'PUT', path, body, action=action)
        return 0 if status == fishlib.STATUS.NO_CONTENT else status
dataset/ETHPy150Open njr0/fish/fish/ls.py/ExtendedFluidinfo.set_raw_perm/original