Bug 988013 - assertion with a simple handle
assertion with a simple handle
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: librepo (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mlcoch
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 10:24 EDT by Ales Kozumplik
Modified: 2014-09-30 19:41 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-25 04:12:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Kozumplik 2013-07-24 10:24:19 EDT
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 10:27:24 EDT
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 04:12:21 EDT
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.