diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index 48ab83cc..a18d6668 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -58,7 +58,7 @@ class OpenFlowController(object): # entry point def __call__(self): - #LOG.debug('call') + # LOG.debug('call') self.server_loop() def server_loop(self): @@ -84,7 +84,7 @@ class OpenFlowController(object): CONF.ofp_tcp_listen_port), datapath_connection_factory) - #LOG.debug('loop') + # LOG.debug('loop') server.serve_forever() @@ -147,7 +147,7 @@ class Datapath(ofproto_protocol.ProtocolDesc): msg = ofproto_parser.msg(self, version, msg_type, msg_len, xid, buf) - #LOG.debug('queue msg %s cls %s', msg, msg.__class__) + # LOG.debug('queue msg %s cls %s', msg, msg.__class__) if msg: ev = ofp_event.ofp_msg_to_ev(msg) self.ofp_brick.send_event_to_observers(ev, self.state) diff --git a/ryu/controller/dpset.py b/ryu/controller/dpset.py index b74e2ec4..399bed93 100644 --- a/ryu/controller/dpset.py +++ b/ryu/controller/dpset.py @@ -112,7 +112,7 @@ class DPSet(app_manager.RyuApp): self.logger.debug('DPSET: Forgetting datapath %s', self.dps[dp.id]) self.logger.debug('DPSET: New datapath %s', dp) self.dps[dp.id] = dp - if not dp.id in self.port_state: + if dp.id not in self.port_state: self.port_state[dp.id] = PortState() ev = EventDP(dp, True) for port in dp.ports.values(): @@ -122,7 +122,7 @@ class DPSet(app_manager.RyuApp): def _unregister(self, dp): # see the comment in _register(). - if not dp in self.dps.values(): + if dp not in self.dps.values(): return LOG.debug('DPSET: unregister datapath %s', dp) assert self.dps[dp.id] == dp