From e1741b7d77d4e57ea96cefe4535c46c83522a677 Mon Sep 17 00:00:00 2001 From: Satoshi Fujimoto Date: Fri, 24 Mar 2017 13:11:06 +0900 Subject: bgp/info_base: Refactor has_nexthop() method Signed-off-by: Satoshi Fujimoto Signed-off-by: FUJITA Tomonori --- ryu/services/protocols/bgp/info_base/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ryu/services/protocols/bgp/info_base/base.py b/ryu/services/protocols/bgp/info_base/base.py index fbf3bc62..68196dfb 100644 --- a/ryu/services/protocols/bgp/info_base/base.py +++ b/ryu/services/protocols/bgp/info_base/base.py @@ -843,8 +843,7 @@ class Path(object): return self._source is None def has_nexthop(self): - return not (not self._nexthop or self._nexthop == '0.0.0.0' or - self._nexthop == '::') + return self._nexthop and self._nexthop not in ('0.0.0.0', '::') def __str__(self): return ( -- cgit v1.2.3