diff options
| author | 2014-10-21 10:33:17 -0300 | |
|---|---|---|
| committer | 2014-10-21 10:33:17 -0300 | |
| commit | 2d14c4b384c7000e264674a92b16e010a510ac05 (patch) | |
| tree | 7676db09f338e46e053170b1c9f7594120b9d434 /scripts/set_version.py | |
| parent | 2d2e97ac540c94e15ac5eccc7d32f3dfb3eea1bc (diff) | |
| parent | 5ec02211214350ee558fd9f6bb052264fd24f75e (diff) | |
Merge tag 'upstream/7.1.0'
Upstream version 7.1.0
Diffstat (limited to 'scripts/set_version.py')
| -rwxr-xr-x | scripts/set_version.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/set_version.py b/scripts/set_version.py index 100a9f7..6a64489 100755 --- a/scripts/set_version.py +++ b/scripts/set_version.py @@ -4,7 +4,7 @@ """Script to set the version number wherever it's needed before a release.""" from __future__ import unicode_literals, print_function -import codecs +import io import os import re import sys @@ -14,12 +14,12 @@ import glob def sed_like_thing(pattern, repl, path): """Like re.sub but applies to a file instead of a string.""" - with codecs.open(path, 'rb', 'utf8') as inf: + with io.open(path, 'r', encoding='utf8') as inf: data = inf.read() data = re.sub(pattern, repl, data) - with codecs.open(path, 'wb+', 'utf8') as outf: + with io.open(path, 'w+', encoding='utf8') as outf: outf.write(data) if __name__ == "__main__": |
