From 072c491da6386654905b710e48b41e998b3a5cac Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Sun, 22 Apr 2018 22:45:32 +0300 Subject: [PATCH] Use wrapped stdout directly --- pre-commit | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pre-commit b/pre-commit index c79b9ec1..acc37a69 100755 --- a/pre-commit +++ b/pre-commit @@ -13,7 +13,6 @@ Travis badge with the current branch. Based on [4]. Copy this file to .git/hooks/ """ -from __future__ import print_function import os import sys @@ -119,6 +118,6 @@ if __name__ == "__main__": with FileInput(path, inplace=True) as readme: for line in readme: - print(fmt_line(line), end='') + sys.stdout.write(fmt_line(line)) sys.exit(call(["git", "add", README]))