[tor-commits] [oonib/master] Avoid the possibility of accidentally sharing the same mutable list for self.input and self.nettest.

art at torproject.org art at torproject.org
Wed Apr 23 14:31:51 UTC 2014


commit ec09d0763e820165e2b9630a4c2eb6ece80f717f
Author: Darius Bacon <darius at wry.me>
Date:   Fri Mar 28 11:40:08 2014 -0700

    Avoid the possibility of accidentally sharing the same mutable list for self.input and self.nettest.
---
 oonib/policy/handlers.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oonib/policy/handlers.py b/oonib/policy/handlers.py
index 7f753b0..b0c1aa5 100644
--- a/oonib/policy/handlers.py
+++ b/oonib/policy/handlers.py
@@ -14,7 +14,8 @@ class Policy(object):
     def __init__(self):
         with open(config.main.policy_file) as f:
             p = yaml.safe_load(f)
-        self.input = self.nettest = []
+        self.input = []
+        self.nettest = []
         if 'nettest' in p.keys():
             self.nettest = list(p['nettest'])
         if 'input' in p.keys():





More information about the tor-commits mailing list