summaryrefslogtreecommitdiff
path: root/rpmio
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-05-19 10:12:43 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-05-19 10:12:43 +0300
commit0e0e332b466a9784620c483faa374067381e96ce (patch)
treec48a9dce26b347d0c5728215d748f6b2641fb86d /rpmio
parent2b7884ce2914c48514023dbe61dc7a126964f438 (diff)
downloadlibrpm-tizen-0e0e332b466a9784620c483faa374067381e96ce.tar.gz
librpm-tizen-0e0e332b466a9784620c483faa374067381e96ce.tar.bz2
librpm-tizen-0e0e332b466a9784620c483faa374067381e96ce.zip
Handle non-existent dependency sets in python (RhBug:593553)
- rpmdsNew() returns NULL if the requested dependency type doesn't exist in the header. The C-side API can handle NULL to all rpmds "methods" and this is how librpm deals with non-existent sets rather than waste memory on for empty ds structures. However the python side wasn't expecting NULL for legal requests (but not setting error either) and thus blowing up with SystemError exception. - Raise TypeError on illegal arguments to rpm.ds constructor, and present non-existent dependency sets as empty rpm.ds objects to python. This lets python callers use iteration over ds items regardless of whether the dependency actually exists or not. The alternative of returning None (or raising exceptions) would break existing code for no particularly good reason.
Diffstat (limited to 'rpmio')
0 files changed, 0 insertions, 0 deletions