[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] torrc panel stacktraced due to filter()
commit d7e9cd9eea9c106ea074f6fb72e444de72d299ed
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits