Code cleanup
This commit is contained in:
parent
2bfb988460
commit
994e83dbeb
46 changed files with 261 additions and 318 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue