Index: abp/filters/rpy.py |
=================================================================== |
--- a/abp/filters/rpy.py |
+++ b/abp/filters/rpy.py |
@@ -61,18 +61,18 @@ |
""" |
if isinstance(data, dict): |
return {strings2utf8(k): strings2utf8(v) for k, v in data.items()} |
if isinstance(data, list): |
return [strings2utf8(v) for v in data] |
if isinstance(data, tuple): |
return tuple(strings2utf8(v) for v in data) |
- if isinstance(data, type('')): # Python 2/3 compatible way of |
- # saying "unicode string". |
+ if isinstance(data, type('')): |
+ # The condition is a Python 2/3 way of saying "unicode string". |
Vasily Kuznetsov
2019/01/30 10:42:48
Reformatted this to avoid E117.
|
return data.encode('utf-8') |
return data |
def line2dict(text, mode='body'): |
"""Convert a filterlist line to a dictionary. |
All strings in the output dictionary will be UTF8 byte strings. This is |