Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
Rafael Monnerat
slapos.buildout
Commits
10d9fed4
Commit
10d9fed4
authored
Aug 24, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow shadir and shacache spec change.
parent
b2134dc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/zc/buildout/testing.py
src/zc/buildout/testing.py
+3
-4
No files found.
src/zc/buildout/testing.py
View file @
10d9fed4
...
...
@@ -557,9 +557,8 @@ class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
class NCHandler(Handler):
def do_POST(self):
path = os.path.abspath(os.path.join(self.tree, *self.path.split('/')))
d = os.path.dirname(path)
if not os.path.exists(d):
os.makedirs(d)
if not os.path.exists(path):
os.makedirs(path)
data = self.rfile.read(int(self.headers.getheader('content-length')))
sha512 = hashlib.sha512(data).hexdigest()
try:
...
...
@@ -568,7 +567,7 @@ class NCHandler(Handler):
pass
else:
data = json.dumps([d])
open(
path
, 'wb').write(data)
open(
os.path.join(path, sha512)
, 'wb').write(data)
self.send_response(201)
self.send_header('Content-Length', str(len(sha512)))
self.send_header('Content-Type', 'text/html')
...
...
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