def _update_term(self):
        """update term's info to wordpress.
        """
        q = self.args.query 
        term = None
        query = self.get_term_query()
        typ = query[0]
        if q and len(q) > 1:
            term = self.get_terms_from_wp(query, force=True)
            if not term:
                slog.error('The term %s is not existend.'%str(q))
                return
            term = self.wpcall(GetTerm(typ, term.id))
            if term:
                term.slug = q[0]
                term.name = q[1]
                if len(q)>2:
                    term.description = q[2]
                # post_tag can not support parent.
                if term.taxonomy == 'post_tag':
                    term.parent = None
                issucc = self.wpcall(EditTerm(term.id, term))
                if issucc:
                    self.cache.save_term(term, typ)
                    self.cache.save_to_file()
                    slog.info('The term %s(%s) has saved.'%(term.slug, term.id))
                else:
                    slog.info('The term %s(%s) saves unsuccessfully.'%(term.slug,
                        term.id))
            else:
                slog.info(typ%'Can not get term "%s".')
        else:
            term = self.get_terms_from_wp(query, force=True)
            if term:
                slog.info('Update terms done.')
            else:
                slog.warning('No terms.')
dataset/ETHPy150Open zrong/wpcmd/wpcmd/update.py/UpdateAction._update_term/swapped operands of `%`