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

- fixed typos

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