]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
pysolv: check applydeltarpm exit status
authorMichael Schroeder <mls@suse.de>
Mon, 17 Jun 2013 12:34:01 +0000 (14:34 +0200)
committerMichael Schroeder <mls@suse.de>
Mon, 17 Jun 2013 12:34:01 +0000 (14:34 +0200)
examples/pysolv

index da9971a81764cdaca7451be70500de405a548e78..a658eabc8f75a12a29bd33bbb6347e30c427fb4a 100755 (executable)
@@ -888,6 +888,9 @@ if newpkgs:
                 nf = tempfile.TemporaryFile()
                 nf = os.dup(nf.fileno())   # get rid of CLOEXEC
                 st = subprocess.call(['/usr/bin/applydeltarpm', '-a', p.arch, "/dev/fd/%d" % f.fileno(), "/dev/fd/%d" % nf])
+                if st:
+                    os.close(nf)
+                    continue
                 os.lseek(nf, 0, os.SEEK_SET)
                 newpkgsfp[p.id] = solv.xfopen_fd("", nf)
                 os.close(nf)