mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-29 17:34:12 +02:00
replace urlgrabber to enable python3 compatibility
- new module grabber.py * OscMirrorGroup to keep urlgrabber.mirrorgroup behavior * OscFileGrabber moved here - meter.py * reworked to use progressbar module instead of progressbar of urlgrabber and simplified the module. - babysitter.py * removed URLGrabErrorr - build.py * removed adding of url_local to urllist. (not needed anymore) * removed URLGrabError - commandline.py * switched from urlgrabber.urlgrab to OscFileGrabber().urlgrab - core.py * reworked progressbar behavior - fetch.py * removed join_url (not needed anymore) * moved OscFileGrabber to grabber.py * removed failureReport (not needed anymore)
This commit is contained in:
@@ -5992,8 +5992,11 @@ def streamfile(url, http_meth = http_GET, bufsize=8192, data=None, progress_obj=
|
||||
cl = int(cl)
|
||||
|
||||
if progress_obj:
|
||||
basename = os.path.basename(urlsplit(url)[2])
|
||||
progress_obj.start(basename=basename, text=text, size=cl)
|
||||
if not text:
|
||||
basename = os.path.basename(urlsplit(url)[2])
|
||||
else:
|
||||
basename = text
|
||||
progress_obj.start(basename, cl)
|
||||
|
||||
if bufsize == "line":
|
||||
bufsize = 8192
|
||||
@@ -6012,7 +6015,7 @@ def streamfile(url, http_meth = http_GET, bufsize=8192, data=None, progress_obj=
|
||||
yield data
|
||||
|
||||
if progress_obj:
|
||||
progress_obj.end(read)
|
||||
progress_obj.end()
|
||||
f.close()
|
||||
|
||||
if not cl is None and read != cl:
|
||||
|
Reference in New Issue
Block a user