

def _graceful(self, neighbor, restarted):
    if (not neighbor.graceful_restart):
        return
    self[Capability.CODE.GRACEFUL_RESTART] = Graceful().set((Graceful.RESTART_STATE if restarted else 0), neighbor.graceful_restart, [(afi, safi, Graceful.FORWARDING_STATE) for (afi, safi) in neighbor.families()])

dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/bgp/message/open/capability/capabilities.py Capabilities._graceful/original