From 5aa0f3e8477035a066c3c30d7c4f6cce6c5ace28 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Sun, 15 Mar 2015 17:33:29 -0400 Subject: [PATCH] Fix pep8 violations in csit/libraries/SwitchManager.py Change-Id: Ibbb0da108bb5447a37a9abf6cf41947f27fefd84 Signed-off-by: Thanh Ha --- test/csit/libraries/SwitchManager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/csit/libraries/SwitchManager.py b/test/csit/libraries/SwitchManager.py index c72c636ae2..d0cab65006 100644 --- a/test/csit/libraries/SwitchManager.py +++ b/test/csit/libraries/SwitchManager.py @@ -3,9 +3,9 @@ Library for the robot based system test tool of the OpenDaylight project. Authors: Baohua Yang@IBM, Denghui Huang@IBM Updated: 2013-11-10 """ -import robot from robot.libraries.BuiltIn import BuiltIn + class SwitchManager(object): def __init__(self): self.builtin = BuiltIn() @@ -14,17 +14,17 @@ class SwitchManager(object): """ Return all nodes. """ - if isinstance(content,dict) and content.has_key('nodeProperties'): + if isinstance(content, dict) and 'nodeProperties' in content: self.builtin.log("18") return [e.get('node') for e in content['nodeProperties']] else: self.builtin.log("21") - return None + return None def extract_all_properties(self, content, property_type): - if isinstance(content,dict) and content.has_key(property_type): + if isinstance(content, dict) and property_type in content: self.builtin.log("26") - list1=[e.get('properties') for e in content[property_type]] + list1 = [e.get('properties') for e in content[property_type]] self.builtin.log(list1) return [e.get('properties') for e in content[property_type]] else: -- 2.36.6