MCPcopy Create free account
hub / github.com/wal-e/wal-e / read

Method read

wal_e/tar_partition.py:88–93  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

86 self.pos = 0
87
88 def read(self, size):
89 max_readable = min(self.target_size - self.pos, size)
90 ret = self.underlying_fp.read(max_readable)
91 lenret = len(ret)
92 self.pos += lenret
93 return ret + b'\0' * (max_readable - lenret)
94
95 def close(self):
96 return self.underlying_fp.close()

Callers 15

readFunction · 0.45
copyfileobjFunction · 0.45
uri_put_fileFunction · 0.45
test_no_errorFunction · 0.45
test_version_printFunction · 0.45
test_do_lzop_getFunction · 0.45
consumeFunction · 0.45
test_rate_limitFunction · 0.45

Calls

no outgoing calls

Tested by 10

test_no_errorFunction · 0.36
test_version_printFunction · 0.36
test_do_lzop_getFunction · 0.36
test_rate_limitFunction · 0.36
test_wal_push_fetchFunction · 0.36
test_backup_push_fetchFunction · 0.36