Changeset - fd5f2b217488
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-08-30 00:03:48
marcin@python-works.com
get stderr also for git commands, pass in shell = False
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/subprocessio.py
Show inline comments
 
@@ -341,9 +341,10 @@ class SubprocessIOChunker(object):
 
        if isinstance(cmd, (list, tuple)):
 
            cmd = ' '.join(cmd)
 

	
 
        _shell = kwargs.get('shell') or True
 
        kwargs['shell'] = _shell
 
        _p = subprocess.Popen(cmd,
 
            bufsize=-1,
 
            shell=True,
 
            stdin=inputstream,
 
            stdout=subprocess.PIPE,
 
            stderr=subprocess.PIPE,
rhodecode/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -115,6 +115,7 @@ class GitRepository(BaseRepository):
 
        try:
 
            opts = dict(
 
                env=gitenv,
 
                shell=False,
 
            )
 
            if os.path.isdir(self.path):
 
                opts['cwd'] = self.path
 
@@ -124,9 +125,7 @@ class GitRepository(BaseRepository):
 
            raise RepositoryError("Couldn't run git command (%s).\n"
 
                                  "Original error was:%s" % (cmd, err))
 

	
 
        so = ''.join(p)
 
        se = None
 
        return so, se
 
        return ''.join(p.output), ''.join(p.error)
 

	
 
    @classmethod
 
    def _check_url(cls, url):
0 comments (0 inline, 0 general)