added dialog when downloading a file

This commit is contained in:
Fabien Benureau 2013-11-18 20:52:39 +01:00
parent be88ab1cf5
commit e6d4c33846

View File

@ -7,6 +7,8 @@ import urlparse
import httplib import httplib
import urllib2 import urllib2
import uis
# files i/o # files i/o
@ -69,6 +71,7 @@ def check_content(path):
def get_content(path): def get_content(path):
"""Will be useful when we need to get content from url""" """Will be useful when we need to get content from url"""
if content_type(path) == 'url': if content_type(path) == 'url':
uis.get_ui().print_('dowloading {}'.format(path))
response = urllib2.urlopen(path) response = urllib2.urlopen(path)
return response.read() return response.read()
else: else: