diff options
author | ptmcg <ptmcg@austin.rr.com> | 2018-10-30 16:57:42 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2018-10-30 16:57:42 -0500 |
commit | 41bb3b91e2f1e552fc1afa2373e21028035471aa (patch) | |
tree | 6ac8572e7cba859d8cd88430b8f839b96aa3bac1 /update_pyparsing_timestamp.py | |
parent | 6c8840a8553eaef161b7d002c00c76dc61644f0d (diff) | |
download | pyparsing-git-41bb3b91e2f1e552fc1afa2373e21028035471aa.tar.gz |
Clean up old cruft from unit tests
Diffstat (limited to 'update_pyparsing_timestamp.py')
-rw-r--r-- | update_pyparsing_timestamp.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/update_pyparsing_timestamp.py b/update_pyparsing_timestamp.py index 80ea3d4..4a82bd1 100644 --- a/update_pyparsing_timestamp.py +++ b/update_pyparsing_timestamp.py @@ -9,9 +9,10 @@ quoted_time = quotedString() quoted_time.setParseAction(lambda: nowstring)
version_time = "__versionTime__ = " + quoted_time
-with open('pyparsing.py') as oldpp:
- new_code = version_time.transformString(oldpp.read())
+with open('pyparsing.py', encoding='utf-8') as oldpp:
+ orig_code = oldpp.read()
+ new_code = version_time.transformString(orig_code)
-with open('pyparsing.py','w') as newpp:
+with open('pyparsing.py','w', encoding='utf-8') as newpp:
newpp.write(new_code)
|