[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [stem/master] Ignore empty strings in exit policy constructor
commit 0fc6178bf07f058bd788ffdacabe1c7897e1b01f
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits