[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit ec09d0763e820165e2b9630a4c2eb6ece80f717f
Author: Darius Bacon <darius@xxxxxx>
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():



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits