diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-12-23 13:54:33 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-01-27 14:25:56 -0500 |
commit | da0d0762fc8a1c3eaa0a7d87fe98179b3a1f25e5 (patch) | |
tree | 956e1b1f749ecf9fdba149a03a0568886753db5d | |
parent | d6c68c80f4c30adfe134dad232995151899195b8 (diff) | |
download | mongo-da0d0762fc8a1c3eaa0a7d87fe98179b3a1f25e5.tar.gz |
SERVER-21905 Python scripts should read text with universal newline support
(cherry picked from commit 0f825e855c65bde8d3f5b7ad1b046088949cc914)
-rw-r--r-- | src/mongo/db/fts/unicode/gen_casefold_map.py | 2 | ||||
-rw-r--r-- | src/mongo/db/fts/unicode/gen_delimiter_list.py | 2 | ||||
-rw-r--r-- | src/mongo/db/fts/unicode/gen_diacritic_list.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/fts/unicode/gen_casefold_map.py b/src/mongo/db/fts/unicode/gen_casefold_map.py index fc55cdd57c7..0b38a317f86 100644 --- a/src/mongo/db/fts/unicode/gen_casefold_map.py +++ b/src/mongo/db/fts/unicode/gen_casefold_map.py @@ -22,7 +22,7 @@ def generate(unicode_casefold_file, target): case_mappings = {} - cf_file = open(unicode_casefold_file, 'r') + cf_file = open(unicode_casefold_file, 'rU') for line in cf_file: # Filter out blank lines and lines that start with # diff --git a/src/mongo/db/fts/unicode/gen_delimiter_list.py b/src/mongo/db/fts/unicode/gen_delimiter_list.py index 5b678400e19..6e13a1887a4 100644 --- a/src/mongo/db/fts/unicode/gen_delimiter_list.py +++ b/src/mongo/db/fts/unicode/gen_delimiter_list.py @@ -21,7 +21,7 @@ def generate(unicode_proplist_file, target): delim_codepoints = set() - proplist_file = open(unicode_proplist_file, 'r') + proplist_file = open(unicode_proplist_file, 'rU') delim_properties = ["White_Space", "Dash", diff --git a/src/mongo/db/fts/unicode/gen_diacritic_list.py b/src/mongo/db/fts/unicode/gen_diacritic_list.py index 260a85307af..6716470ba8c 100644 --- a/src/mongo/db/fts/unicode/gen_diacritic_list.py +++ b/src/mongo/db/fts/unicode/gen_diacritic_list.py @@ -20,7 +20,7 @@ def generate(unicode_proplist_file, target): diacritics = set() - proplist_file = open(unicode_proplist_file, 'r') + proplist_file = open(unicode_proplist_file, 'rU') for line in proplist_file: # Filter out blank lines and lines that start with # |