[tor-commits] [stem/master] Including param constraints for UseOptimisticData
atagar at torproject.org
atagar at torproject.org
Sat Mar 16 23:06:29 UTC 2013
commit cb7915bb4734742f487519dad6ce0ec2a84b5bb7
Author: Damian Johnson <atagar at torproject.org>
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))
More information about the tor-commits
mailing list