From: Oleg Broytman Date: Sun, 9 Apr 2017 01:21:40 +0000 (+0300) Subject: Adapt set-commit-date.py to Python 3: turn on universal_newlines X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=a78cda4ceab33318042626138aaf727a2fa871c0;p=git-scripts.git Adapt set-commit-date.py to Python 3: turn on universal_newlines --- diff --git a/set-commit-date.py b/set-commit-date.py index c5d49d4..dc6a5fb 100755 --- a/set-commit-date.py +++ b/set-commit-date.py @@ -13,7 +13,8 @@ separator = '----- GIT LOG SEPARATOR -----' git_log = subprocess.Popen(['git', 'log', '-m', '--first-parent', '--name-only', '--no-color', '--format=%s%%n%%ct' % separator], - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + universal_newlines=True) filenames = set() # stages: 1 - start of commit, 2 - timestamp, 3 - empty line, 4 - files stage = 1