[tor-commits] [stem/master] Ignore empty strings in exit policy constructor
atagar at torproject.org
atagar at torproject.org
Mon Mar 28 21:41:08 UTC 2016
commit 0fc6178bf07f058bd788ffdacabe1c7897e1b01f
Author: Damian Johnson <atagar at torproject.org>
Date: Mon Mar 28 14:38:14 2016 -0700
Ignore empty strings in exit policy constructor
Making the constructor behave a bit more intuitively to avoid the confusion
in...
https://trac.torproject.org/projects/tor/ticket/18666
---
stem/exit_policy.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/stem/exit_policy.py b/stem/exit_policy.py
index 003107e..3d4e66a 100644
--- a/stem/exit_policy.py
+++ b/stem/exit_policy.py
@@ -449,6 +449,9 @@ class ExitPolicy(object):
decompressed_rules = self._input_rules
for rule in decompressed_rules:
+ if not rule.strip():
+ continue
+
if isinstance(rule, bytes):
rule = stem.util.str_tools._to_unicode(rule)
More information about the tor-commits
mailing list