[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [oonib/master] If p is a dictionary (as I assume) then you don't need the .keys().
commit 3af27326a39046ad8397fb92a4b5ee398418096b
Author: Darius Bacon <darius@xxxxxx>
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):
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits