diff options
author | Yoshihiro Kaneko <ykaneko0929@gmail.com> | 2014-05-13 19:15:12 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-05-14 13:19:16 +0900 |
commit | f79634b3c705259408d9be24b45b4ba3dd42fa28 (patch) | |
tree | c0e0f8ddbb8eab031dd7b6425e3679eb0bd64e97 | |
parent | df8f807e13b97b6c0045dc375ec835f266c59a62 (diff) |
base/app_manager: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/base/app_manager.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py index 971918cc..387d6ce3 100644 --- a/ryu/base/app_manager.py +++ b/ryu/base/app_manager.py @@ -47,7 +47,7 @@ def _lookup_service_brick_by_mod_name(mod_name): def register_app(app): assert isinstance(app, RyuApp) - assert not app.name in SERVICE_BRICKS + assert app.name not in SERVICE_BRICKS SERVICE_BRICKS[app.name] = app register_instance(app) @@ -211,7 +211,7 @@ class RyuApp(object): return handlers def test(h): - if not ev_cls in h.callers: + if ev_cls not in h.callers: # this handler does not listen the event. return False states = h.callers[ev_cls].dispatchers @@ -356,7 +356,7 @@ class AppManager(object): context_modules = map(lambda x: x.__module__, self.contexts_cls.values()) for i in get_dependent_services(cls): - if not i in context_modules: + if i not in context_modules: services.append(i) if services: app_lists.extend(services) @@ -369,7 +369,7 @@ class AppManager(object): else: context = cls() LOG.info('creating context %s', key) - assert not key in self.contexts + assert key not in self.contexts self.contexts[key] = context return self.contexts @@ -412,7 +412,7 @@ class AppManager(object): # Yes, maybe for slicing. LOG.info('instantiating app %s of %s', app_name, cls.__name__) - if hasattr(cls, 'OFP_VERSIONS') and not cls.OFP_VERSIONS is None: + if hasattr(cls, 'OFP_VERSIONS') and cls.OFP_VERSIONS is not None: ofproto_protocol.set_app_supported_versions(cls.OFP_VERSIONS) if app_name is not None: |