Bug 977803

Summary: py: ctrl-c not throwing KeyboardInterrupt under specific circumstances.
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-17 11:49:29 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:
Bug Depends On:    
Bug Blocks: 977661    

Description Ales Kozumplik 2013-06-25 11:11:22 UTC
Description of problem:
Have a (large, e.g. the F19) repo synced in ./repodata.

Run the script:

#! /usr/bin/python

import librepo

MIRROR="""https://mirrors.fedoraproject.org/metalink?repo=fedora-19&arch=x86_64"""
DESTDIR="./"

if __name__ == "__main__":
    h = librepo.Handle()
    h.destdir = DESTDIR
    h.interruptible = True
    h.url = DESTDIR
    h.repotype = librepo.LR_YUMREPO
    h.mirrorlist = MIRROR
    h.yumdlist = ["primary", "filelists", "prestodelta", "group_gz"]
    h.local = True
    h.perform(librepo.Result())
    print(h.mirrors)

Press Ctrl-C during h.perform(). No KeyboardInterrupt will be raised. The last statement will print None (this verifies we pressed Ctrl+C in the right moment yet the perform() somehow didn't finish correctly).

Comment 2 Ales Kozumplik 2013-07-03 12:57:31 UTC
Tomas, what librepo version will this be included in?

Comment 3 Tomas Mlcoch 2013-07-04 10:59:43 UTC
librepo-0.0.5