[tor-commits] [nyx/master] torrc panel stacktraced due to filter()
atagar at torproject.org
atagar at torproject.org
Sun Aug 28 18:29:22 UTC 2016
commit d7e9cd9eea9c106ea074f6fb72e444de72d299ed
Author: Damian Johnson <atagar at torproject.org>
Date: Sun Aug 28 10:35:16 2016 -0700
torrc panel stacktraced due to filter()
Anther spot where we need to standardize our use of filter(). This one
manifested as a stacktrace when viewing the torrc panel with...
AttributeError: 'filter' object has no attribute 'strip'
---
nyx/panel/torrc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nyx/panel/torrc.py b/nyx/panel/torrc.py
index d5e890e..eeb08e6 100644
--- a/nyx/panel/torrc.py
+++ b/nyx/panel/torrc.py
@@ -25,7 +25,7 @@ def _read_torrc(path):
with open(path) as torrc_file:
for line in torrc_file.readlines():
line = line.replace('\t', ' ').replace('\xc2', "'").rstrip()
- contents.append(filter(lambda char: char in string.printable, line))
+ contents.append(''.join(filter(lambda char: char in string.printable, line)))
return contents
More information about the tor-commits
mailing list