Commit 763291b1 authored by Christian Theune's avatar Christian Theune

- fixed typos

parent c7a04601
......@@ -940,7 +940,7 @@ class ClientStorage(object):
return True
return False
def recieveBlobStart(self, oid, serial):
def receiveBlobStart(self, oid, serial):
blob_filename = self.fshelper.getBlobFilename(oid, serial)
assert not os.path.exists(blob_filename)
assert os.path.exists(blob_filename+'.lock')
......@@ -949,14 +949,14 @@ class ClientStorage(object):
f = open(blob_filename, 'wb')
f.close()
def recieveBlobChunk(self, oid, serial, chunk):
def receiveBlobChunk(self, oid, serial, chunk):
blob_filename = self.fshelper.getBlobFilename(oid, serial)+'.dl'
assert os.path.exists(blob_filename)
f = open(blob_filename, 'ab')
f.write(chunk)
f.close()
def recieveBlobStop(self, oid, serial):
def receiveBlobStop(self, oid, serial):
blob_filename = self.fshelper.getBlobFilename(oid, serial)
os.rename(blob_filename+'.dl', blob_filename)
......
......@@ -64,14 +64,14 @@ class ClientStorage:
def storeBlob(self, oid, serial, blobfilename):
def store():
yield ('recieveBlobStart', (oid, serial))
yield ('receiveBlobStart', (oid, serial))
f = open(blobfilename, 'rb')
while 1:
chunk = f.read(59000)
if not chunk:
break
yield ('recieveBlobChunk', (oid, serial, chunk, ))
yield ('receiveBlobChunk', (oid, serial, chunk, ))
f.close()
yield ('recieveBlobStop', (oid, serial))
yield ('receiveBlobStop', (oid, serial))
self.rpc.callAsyncIterator(store())
......@@ -311,9 +311,9 @@ class Connection(smac.SizedMessageAsyncConnection, object):
# storeBlobEnd
# storeBlobShared
# Added blob-support client methods:
# recieveBlobStart
# recieveBlobChunk
# recieveBlobStop
# receiveBlobStart
# receiveBlobChunk
# receiveBlobStop
# XXX add blob methods
......
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