Merge pull request #349 from kovacsbalu/fix-paste-encoding

Fix #314
pull/422/head
Thirion Aurélien 2019-05-16 14:30:33 +02:00 committed by GitHub
commit 9c6a1ea8ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -125,7 +125,15 @@ class Paste(object):
"""
try:
paste = self.cache.get(self.p_path)
except UnicodeDecodeError:
paste = None
except Exception as e:
print("ERROR in: " + self.p_path)
print(e)
paste = None
if paste is None:
try:
with gzip.open(self.p_path, 'r') as f: