Index: abp/filters/sources.py |
=================================================================== |
--- a/abp/filters/sources.py |
+++ b/abp/filters/sources.py |
@@ -164,18 +164,18 @@ |
""" |
url = '{}:{}'.format(self.protocol, path_in_source) |
try: |
response = urlopen(url) |
info = response.info() |
# info.getparam became info.get_param in Python 3 so we'll |
# try both. |
- get_param = (getattr(info, 'get_param', None) or |
- getattr(info, 'getparam', None)) |
+ get_param = (getattr(info, 'get_param', None) |
+ or getattr(info, 'getparam', None)) |
encoding = get_param('charset') or self.default_encoding |
for line in response: |
yield line.decode(encoding).rstrip() |
except HTTPError as err: |
if err.code == 404: |
raise NotFound("HTTP 404 Not found: '{}:{}'" |
.format(self.protocol, path_in_source)) |
raise err |