call the subprocess.Popen function with, 'git log --pretty=format:%ct --quiet -1 HEAD', stdout set to subprocess.PIPE,
git_log = subprocess . Popen ( 'git log --pretty=format:%ct --quiet -1 HEAD' , stdout = subprocess . PIPE , stderr = subprocess . PIPE , shell = True , cwd = repo_dir , universal_newlines = True )