Commit 8fb3c29a authored by Łukasz Nowak's avatar Łukasz Nowak

Simplify imports

parent 27cdcb1c
......@@ -19,8 +19,8 @@ import httplib
import json
import os
import tempfile
from urllib import urlretrieve
from urlparse import urlparse
import urllib
import urlparse
class NetworkcacheClient(object):
......@@ -33,7 +33,7 @@ class NetworkcacheClient(object):
def parseUrl(self, url):
return_dict = {}
parsed_url = urlparse(url)
parsed_url = urlparse.urlparse(url)
return_dict['header_dict'] = {'Content-Type': 'application/json'}
user = parsed_url.username
passwd = parsed_url.password
......@@ -133,7 +133,7 @@ class NetworkcacheClient(object):
'''
sha_cache_url = os.path.join(self.shacache_url, sha512sum)
file_descriptor = tempfile.NamedTemporaryFile()
path, headers = urlretrieve(sha_cache_url, file_descriptor.name)
path, headers = urllib.urlretrieve(sha_cache_url, file_descriptor.name)
file_descriptor.seek(0)
return file_descriptor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment