[oonib/master] If p is a dictionary (as I assume) then you don't need the .keys().

commit f4a18e0d4f0ebeab05ca340de92e258cd1b6e562 Author: Darius Bacon <darius@wry.me> Date: Fri Mar 28 11:41:11 2014 -0700 If p is a dictionary (as I assume) then you don't need the .keys(). --- oonib/policy/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oonib/policy/handlers.py b/oonib/policy/handlers.py index b0c1aa5..cbf1c08 100644 --- a/oonib/policy/handlers.py +++ b/oonib/policy/handlers.py @@ -16,9 +16,9 @@ class Policy(object): p = yaml.safe_load(f) self.input = [] self.nettest = [] - if 'nettest' in p.keys(): + if 'nettest' in p: self.nettest = list(p['nettest']) - if 'input' in p.keys(): + if 'input' in p: self.input = list(p['input']) def validateInputHash(self, input_hash):
participants (1)
-
art@torproject.org