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

[tor-commits] [stem/master] Including param constraints for UseOptimisticData



commit cb7915bb4734742f487519dad6ce0ec2a84b5bb7
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Mar 16 09:42:41 2013 -0700

    Including param constraints for UseOptimisticData
    
    We were missing the bounds for the UseOptimisticData parameter.
---
 stem/descriptor/networkstatus.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/stem/descriptor/networkstatus.py b/stem/descriptor/networkstatus.py
index de0b945..74431d1 100644
--- a/stem/descriptor/networkstatus.py
+++ b/stem/descriptor/networkstatus.py
@@ -778,6 +778,8 @@ class _DocumentHeader(object):
         minimum = 500
       elif key == "cbtinitialtimeout":
         minimum = self.params.get("cbtmintimeout", minimum)
+      elif key == "UseOptimisticData":
+        minimum, maximum = 0, 1
 
       if value < minimum or value > maximum:
         raise ValueError("'%s' value on the params line must be in the range of %i - %i, was %i" % (key, minimum, maximum, value))



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