[projects/git-slug: 147/170] Print both stdout and stderr at error

glen glen at pld-linux.org
Mon Sep 21 21:51:10 CEST 2015


commit 04353b0b17990eec4625e53254a43c76a0bba133
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Tue Nov 20 13:55:29 2012 +0000

    Print both stdout and stderr at error
    
    Git prints sometimes directions how to recover from error situation.
    As they are printed to stdout, it needs also to be caught in exception.

 git_slug/gitrepo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/git_slug/gitrepo.py b/git_slug/gitrepo.py
index 27ba357..80e84a3 100644
--- a/git_slug/gitrepo.py
+++ b/git_slug/gitrepo.py
@@ -30,7 +30,7 @@ class GitRepo:
         proc = self.command(clist)
         (out, err) = proc.communicate()
         if proc.returncode:
-            raise GitRepoError(err.decode('utf-8'))
+            raise GitRepoError((out + err).decode('utf-8'))
         return (out, err)
 
     def checkout(self, branch):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list