forked from MestreLion/git-tools
-
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.
Process subprocess output as strings, not bytes
MestreLion#23 git-restore-mtime fails on python3 since output from subprocesses is interpreted as bytes instead of strings. Modify calls to subprocess methods to pass "universal_newlines=True", so that output is returned as strings instead, which more closely resembles how python2 interprets things. This also allows the script to still run on python2 as the "universal_newlines" keyword is ignored. With this change, there's no need for the python2 vs. python3 text() method, so its definition and usages were removed as well. Tested on Linux: python 2.7, python 3.4, python 3.5
- Loading branch information
Showing
1 changed file
with
8 additions
and
14 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