def update_fluidinfo(self, db, permsToSet=None, force=False,
                         restrict_to=None, verbose=False):
        permsToSet = permsToSet or ALL_NAMES
        # check owner has control permissions
        if not force:
            for name in CONTROL_NAMES:
                if hasattr(self, name):
                    self.check_owner_control(self.__dict__[name])
        entities = (u'abstract-tag', u'tag') if self.isTag else (u'namespace',)
        for entity in entities:
            for name in RAW_PERMS[entity].names:
                if name in permsToSet and (not restrict_to
                                           or name in restrict_to):
                    action = RAW_PERMS[entity].action(name)
                    if verbose:
                        db.Print(u'Setting %s %s\'s %s permission to %s '
                                 u'except %s' % (entity, self.path[1:],
                                                 action,
                                  self.__dict__[name].policy,
                                  unicode(self.__dict__[name].exceptions)))
                    err = db.set_raw_perm(entity, self.path[1:], action,
                                          self.__dict__[name].policy,
                                          self.__dict__[name].exceptions)
                    if err:
                        db.warning(cli.error_code(err))
dataset/ETHPy150Open njr0/fish/fish/ls.py/FluidinfoPerms.update_fluidinfo/original