[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 2b8081ef8de3efe6434fe67a4e7e16ecde7abb11
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