Make sure that urlgrabber gets URLs as strings
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 16 Oct 2012 12:40:50 +0000 (15:40 +0300)
committerGui Chen <gui.chen@intel.com>
Sat, 16 Feb 2013 02:30:13 +0000 (10:30 +0800)
URLs of unicode type cause a crash in python-urlgrabber.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
mic/utils/grabber.py

index 31e9d04..cf2fe09 100644 (file)
@@ -35,7 +35,7 @@ def myurlgrab(url, filename, proxies, progress_obj = None):
 
     else:
         try:
-            filename = g.urlgrab(url = url, filename = filename,
+            filename = g.urlgrab(url = str(url), filename = filename,
                 ssl_verify_host = False, ssl_verify_peer = False,
                 proxies = proxies, http_headers = (('Pragma', 'no-cache'),),
                 quote = 0, progress_obj = progress_obj)