Code cleanup

This commit is contained in:
Joel Collins 2020-10-14 14:56:29 +00:00
parent 2bfb988460
commit 994e83dbeb
46 changed files with 261 additions and 318 deletions

View file

@ -46,8 +46,8 @@ class UserComment:
cls._JIS_PREFIX: cls._JIS,
cls._UNICODE_PREFIX: cls._UNICODE,
}[prefix]
except KeyError:
raise ValueError("unable to determine appropriate encoding")
except KeyError as e:
raise ValueError("unable to determine appropriate encoding") from e
return body.decode(encoding, errors="replace")
@classmethod