hi, plaese see the sample below. the RuntimeError is never observed. I would expect it to be (as soon as possible) propagated outside of the download_packages() call. We don't want to have failing code silently rotting somewhere. #! /usr/bin/python import librepo URL = 'http://mirrors.fedoraproject.org/metalink?repo=updates-released-f19&arch=x86_64' def progress(*args): print(args) raise RuntimeError('some') def main(): h = librepo.Handle() h.setopt(librepo.LRO_MIRRORLIST, URL) h.repotype = librepo.LR_YUMREPO h.destdir = './' r = librepo.Result() h.interruptible = True h.connecttimeout = 1 target = librepo.PackageTarget("texlive-collection-pstricks-svn30307.0-0.1.20130608_r30832.fc19.noarch.rpm", handle=h, progresscb=progress, cbdata="tyeah") librepo.download_packages([target]) if __name__ == '__main__': main()
Fix just pushed to HEAD. During tomorrow I will add few more fixes and make a build.
Looking at the fix I don't think it's going to show the traceback on an uncaught exception though, yes? Ideally, the Python layer should just transparently propagate the original exception up, either to be caught or let uncaught so we get the traceback.
In the original patch, there was missing proper "exception propagation" mechanism for the Handle.perform() method (but download_packages() was working properly). Now, this is fixed and all uncaught exceptions are propagated properly from all functions that can call python callbacks (Handle.perform(), download_packages(), etc.).
Excellent, thank you Tomas!
librepo-1.6.0-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/librepo-1.6.0-1.fc20
Package librepo-1.6.0-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing librepo-1.6.0-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-3120/librepo-1.6.0-1.fc20 then log in and leave karma (feedback).
librepo-1.6.0-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.