From: Aurelien Jacobs Date: Sun, 1 Dec 2013 00:42:22 +0000 (+0100) Subject: check the return value of git clone instead of its stderr content X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;h=617f4da0e8eb4abf961b9b8e91fc4d995cc5341c;p=sigrok-util.git check the return value of git clone instead of its stderr content --- diff --git a/source/new-driver b/source/new-driver index 6e6977b..2f8d5a0 100755 --- a/source/new-driver +++ b/source/new-driver @@ -77,8 +77,9 @@ def new_driver(): tmp = tempfile.mkdtemp() try: os.chdir(tmp) - out, err = Popen("git clone " + LIBSR, shell=True, stderr=PIPE).communicate() - if err: + process = Popen("git clone " + LIBSR, shell=True, stderr=PIPE) + out, err = process.communicate() + if process.returncode: raise Exception(err.decode()) gitdir = tmp + '/libsigrok/' do_configure_ac(gitdir)