From 0ceed1ea1aed2083172d6a17b475d7185d93e416 Mon Sep 17 00:00:00 2001
From: Chia-Lin Cho <fox91119@gmail.com>
Date: Sun, 13 Sep 2015 00:59:27 +0800
Subject: [PATCH] Fixed conditional statement

_is_edge_port(port) in switches.py will return `False` if the port belongs to link.

Signed-off-by: Chia-Lin Cho <fox91119@gmail.com>
---
 ryu/topology/switches.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
index af4bf80..f419838 100644
--- a/ryu/topology/switches.py
+++ b/ryu/topology/switches.py
@@ -805,7 +805,7 @@ class Switches(app_manager.RyuApp):
 
             # remove hosts from edge port
             for host in self.hosts.values():
-                if self._is_edge_port(host.port):
+                if not self._is_edge_port(host.port):
                     del self.hosts[host.mac]
 
         if not self.links.update_link(src, dst):
-- 
1.9.5 (Apple Git-50.3)

