#NEWLINE# def StoreBlob( self , blob_key , blob_stream ) : #NEWLINE# #INDENT# 'Store blob stream.' #NEWLINE# content = StringIO . StringIO ( ) #NEWLINE# try : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# block = blob_stream . read ( ( 1 << 20 ) ) #NEWLINE# if ( not block ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# content . write ( content ) #NEWLINE# #UNINDENT# self . CreateBlob ( blob_key , content . getvalue ( ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# content . close ( )