Bug 988013 - assertion with a simple handle
Summary: assertion with a simple handle
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: librepo
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mlcoch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-24 14:24 UTC by Ales Kozumplik
Modified: 2014-09-30 23:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-25 08:12:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.