Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.libnetworkcache
Commits
8fb3c29a
Commit
8fb3c29a
authored
Jul 01, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify imports
parent
27cdcb1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
slapos/libnetworkcache.py
slapos/libnetworkcache.py
+4
-4
No files found.
slapos/libnetworkcache.py
View file @
8fb3c29a
...
...
@@ -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
=
url
lib
.
url
retrieve
(
sha_cache_url
,
file_descriptor
.
name
)
file_descriptor
.
seek
(
0
)
return
file_descriptor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment