]> git.phdru.name Git - git-scripts.git/commitdiff
Adapt set-commit-date.py to Python 3: turn on universal_newlines
authorOleg Broytman <phd@phdru.name>
Sun, 9 Apr 2017 01:21:40 +0000 (04:21 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 9 Apr 2017 01:21:40 +0000 (04:21 +0300)
set-commit-date.py

index c5d49d4225e7864bfdc7710e83179da805d0289b..dc6a5fb732d93a0499323e9197305797a24172d8 100755 (executable)
@@ -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