From fbfb098a7d66bfce97c19db688f1cc80cc4d460b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 1 Dec 2010 10:17:12 +0100 Subject: [PATCH] Move urlparse import where it belongs. --- osc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index 97207383..7f562829 100644 --- a/osc/core.py +++ b/osc/core.py @@ -4495,12 +4495,12 @@ def streamfile(url, http_meth = http_GET, bufsize=8192, data=None, progress_obj= caller. """ f = http_meth.__call__(url, data = data) - import urlparse cl = f.info().get('Content-Length') if cl is not None: cl = int(cl) if progress_obj: + import urlparse basename = os.path.basename(urlparse.urlsplit(url)[2]) progress_obj.start(basename=basename, text=text, size=cl) data = f.read(bufsize)