]> sigrok.org Git - sigrok-util.git/commitdiff
check the return value of git clone instead of its stderr content
authorAurelien Jacobs <redacted>
Sun, 1 Dec 2013 00:42:22 +0000 (01:42 +0100)
committerBert Vermeulen <redacted>
Sun, 1 Dec 2013 00:50:54 +0000 (01:50 +0100)
source/new-driver

index 6e6977bad8a596774b9a4ce7d7f4dedff41745c4..2f8d5a07bb1bf0e918c5b8c6cf56882880628de0 100755 (executable)
@@ -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)