s4cmd.py
def read_file_chunk(self, source, pos, chunk):
    '''Read local file chunk'''
    if chunk==0:
        return StringIO()
    data = None
    with open(source, 'rb') as f:
      f.seek(pos)
      data = f.read(chunk)
    if not data:
      raise Failure('Unable to read data from source: %s' % source)
    return StringIO(data)
def read_file_chunk(self, source, pos, chunk):
    '''Read local file chunk'''
    if chunk==0:
        return StringIO()
    data = None
    with open(source, 'rb') as f:
      f.seek(pos)
      data = f.read(chunk)
    if not data:
      raise Failure('Unable to read data from source: %s' % source)
    return StringIO(data)
def read_file_chunk ( self , source , pos , chunk ) : if chunk == 0 : return StringIO ( ) data = None with open ( source , 'rb' ) as f : f . seek ( pos ) data = f . read ( chunk ) if not data : raise Failure ( 'Unable to read data from source: %s' % source ) return StringIO ( data )
Read local file chunk
Read local file chunk