mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Bugfix: UnicodeDecodeError: 'utf-8' codec can't decode byte
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
ca82200665
commit
caa72df379
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ class URL:
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
f = self.http.request('GET', self.link)
|
f = self.http.request('GET', self.link)
|
||||||
return f.data.decode("utf-8")
|
return f.data.decode("utf-8", "ignore")
|
||||||
except urllib3.exceptions.NewConnectionError:
|
except urllib3.exceptions.NewConnectionError:
|
||||||
print("\n{0}Can't read the file '{1}'{2}".format(
|
print("\n{0}Can't read the file '{1}'{2}".format(
|
||||||
self.meta.color["RED"], self.link.split("/")[-1],
|
self.meta.color["RED"], self.link.split("/")[-1],
|
||||||
|
|
Loading…
Add table
Reference in a new issue