diff options
| author | Damian Johnson <atagar@torproject.org> | 2016-03-28 14:38:14 -0700 |
|---|---|---|
| committer | Damian Johnson <atagar@torproject.org> | 2016-03-28 14:38:14 -0700 |
| commit | 0fc6178bf07f058bd788ffdacabe1c7897e1b01f (patch) | |
| tree | 4b75717c6b84aea055562027aabbb58a269fa029 | |
| parent | 7bfc752b69972f7043b260651602b8cb7bc270c4 (diff) | |
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
| -rw-r--r-- | stem/exit_policy.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/stem/exit_policy.py b/stem/exit_policy.py index 003107e5..3d4e66a0 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) |
