summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-06-17 14:34:01 +0200
committerMichael Schroeder <mls@suse.de>2013-06-17 14:34:01 +0200
commitc4490a3492a8e4afd8e48090ff117331d011ba87 (patch)
tree850589440de9ad46efebf4e7ddd5299f670e4016 /examples
parente9666fb9b317ba613da1552af7d6fedb3041b370 (diff)
downloadlibsolv-c4490a3492a8e4afd8e48090ff117331d011ba87.tar.gz
libsolv-c4490a3492a8e4afd8e48090ff117331d011ba87.tar.bz2
libsolv-c4490a3492a8e4afd8e48090ff117331d011ba87.zip
pysolv: check applydeltarpm exit status
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/pysolv3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/pysolv b/examples/pysolv
index da9971a..a658eab 100755
--- a/examples/pysolv
+++ b/examples/pysolv
@@ -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)