-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The check to see if a value was in the list of scrub fields needs to do a .lower() which will do an implicit conversion of the value if it's not already a unicode string. That can cause UnicodeDecodeErrors so I added a _to_text() function which will attempt a couple of different ways at converting bytes to unicode, (for python 2.) I also bumped the minor version and added a beta.1 tag since this code is potentially buggy, (unicode is always difficult to get right, especially across Python versions.) @brianr
- Loading branch information
Showing
2 changed files
with
55 additions
and
39 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
Looks like this is going to do the
_to_text
conversion many times. Isn'tscrub_fields
set at config time? Perhaps we could do the_to_text
call then, and just once?