(self, chain)
return Policy(pol), (cntrs.pcnt, cntrs.bcnt)
Returns the policy of *chain* as a string.
Returns the policy of *chain* as a string.
Returns the policy of * chain * as a string .
def get_policy(self, chain):
        """Returns the policy of *chain* as a string."""
        if isinstance(chain, Chain):
            chain = chain.name
        if not self.builtin_chain(chain):
            return None, None
        cntrs = xt_counters()
        pol = self._iptc.iptc_get_policy(chain.encode(), ct.pointer(cntrs),
                                         self._handle).decode()
        if not pol:
            raise IPTCError("can't get policy on chain %s: %s" %
                            (chain, self.strerror()))
        return Policy(pol), (cntrs.pcnt, cntrs.bcnt)
def get_policy ( self , chain ) : if isinstance ( chain , Chain ) : chain = chain . name if not self . builtin_chain ( chain ) : return None , None cntrs = xt_counters ( ) pol = self . _iptc . iptc_get_policy ( chain . encode ( ) , ct . pointer ( cntrs ) , self . _handle ) . decode ( ) if not pol : raise IPTCError ( "can't get policy on chain %s: %s" % ( chain , self . strerror ( ) ) ) return Policy ( pol ) , ( cntrs . pcnt , cntrs . bcnt )