Bug 988013

Summary: assertion with a simple handle
Product: [Fedora] Fedora Reporter: Ales Kozumplik <akozumpl>
Component: librepoAssignee: Tomas Mlcoch <tmlcoch>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jzeleny, tmlcoch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-25 08:12:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ales Kozumplik 2013-07-24 14:24:19 UTC
this aborts() for me (librepo-0.0.5):

#! /usr/bin/python

import librepo

if __name__ == "__main__":
    h = librepo.Handle()
    h.download('x', None)

Comment 1 Ales Kozumplik 2013-07-24 14:27:24 UTC
The output:

python: /home/akozumpl/repos/librepo/librepo/package_downloader.c:74: lr_download_package: Assertion `0' failed.
Aborted

Comment 2 Tomas Mlcoch 2013-07-25 08:12:21 UTC
Hi,
if you want to use download() method, you have to set a repository type:

    h.setopt(librepo.LRO_REPOTYPE, librepo.LR_YUMREPO)
or:
    h.repotype = librepo.LR_YUMREPO

I've fixed that, so it will raise a python exception instead of abort().

https://github.com/Tojaj/librepo/commit/024ef3d6c171de360839d39c8eb5f1715e48d7df