[master 1/1] Fix the pylint pre-commit hook for python3 and pocketlint

dashea installerbot-noreply at redhat.com
Wed Jun 10 18:38:58 UTC 2015


From: David Shea <dshea at redhat.com>

---
 scripts/githooks/pre-commit | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/githooks/pre-commit b/scripts/githooks/pre-commit
index cea8b89..40ae626 100755
--- a/scripts/githooks/pre-commit
+++ b/scripts/githooks/pre-commit
@@ -39,7 +39,7 @@ except CalledProcessError:
 if not git_files:
     sys.exit(0)
 
-git_files = git_files.strip('\0').split('\0')
+git_files = git_files.decode('utf-8').strip('\0').split('\0')
 
 pylint_names = []
 pylint_files = []
@@ -82,9 +82,9 @@ env["PYTHONPATH"] = OTHER_MODULES_PATH
 
 print("Running pylint on %s" % " ".join(pylint_names))
 try:
-    check_output(["./tests/pylint/runpylint.sh"] + pylint_files, env=env)
+    check_output(["./tests/pylint/runpylint.py"] + pylint_files, env=env)
 except CalledProcessError as e:
-    print(e.output)
+    print(e.output.decode('utf-8'))
     sys.exit(1)
 
 sys.exit(0)


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/e6436a05dfa103805905285e7e4d655354af57bd


More information about the anaconda-patches mailing list