(self, chain, new_name)
Rename chain *chain* to *new_name*.
Rename chain *chain* to *new_name*.
Rename chain * chain * to * new_name * .
def rename_chain(self, chain, new_name):
        """Rename chain *chain* to *new_name*."""
        if isinstance(chain, Chain):
            chain = chain.name
        rv = self._iptc.iptc_rename_chain(chain.encode(), new_name.encode(),
                                          self._handle)
        if rv != 1:
            raise IPTCError("can't rename chain %s: %s" % (chain,
                                                           self.strerror()))
def rename_chain ( self , chain , new_name ) : if isinstance ( chain , Chain ) : chain = chain . name rv = self . _iptc . iptc_rename_chain ( chain . encode ( ) , new_name . encode ( ) , self . _handle ) if rv != 1 : raise IPTCError ( "can't rename chain %s: %s" % ( chain , self . strerror ( ) ) )