forked from mopidy/mopidy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: Raise ValueError if Path is asked to serialize unicode
If we accept unicode and try to encode using sys.getfilesystemencoding() then it may work most of the time, but will fail if we get non-ASCII chars in the unicode string and the file system encoding is e.g. ANSI-something because the locale is C. Thus, I figure it is better to always fail if we try to serialize Path from unicode strings. Paths should be maintained as bytes all the time.
- Loading branch information
Showing
2 changed files
with
2 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters