diff options
author | Satoshi Fujimoto <satoshi.fujimoto7@gmail.com> | 2017-03-24 13:11:06 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-03-28 11:01:12 +0900 |
commit | e1741b7d77d4e57ea96cefe4535c46c83522a677 (patch) | |
tree | 22b419ff3eb08cd416adf4cd99070f25166d34d9 | |
parent | 399a03feb1984e660f8f51d03d3ce4d09a774b70 (diff) |
bgp/info_base: Refactor has_nexthop() method
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/services/protocols/bgp/info_base/base.py | 3 |
1 files changed, 1 insertions, 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 ( |