# - S-Core Co., Ltd
import os
+import logging
from urlgrabber import grabber
from tic.utils.error import TICError, RepoError
from tic.utils import process
def myurlgrab(url, filename, proxies, progress_obj = None):
+ logger = logging.getLogger(__name__)
g = grabber.URLGrabber()
if url.startswith("file:/"):
else:
# untouch repometadata in source path
process.run(['cp', '-f', filepath, filename])
+ logger.info('copy file ' + filepath)
else:
try:
# cast url to str here, sometimes it can be unicode,
http_headers=(('Pragma', 'no-cache'),),
quote=0,
progress_obj=progress_obj)
+ logger.info('download file from ' + str(url))
except grabber.URLGrabError as err:
if err.code == 22:
msg = 'The requested url was not found (%s)' % url