summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-05-24 13:18:01 +0200
committerLars Wirzenius <liw@liw.fi>2012-05-24 13:18:01 +0200
commit051b0ba5e525c2846dc960563e014747ada31a60 (patch)
treefece08f0dadf08af9f3804efb14e84dd381b4eed
parent699df087f208d4a730bffb1ccfee848a710941ce (diff)
downloadobnam-051b0ba5e525c2846dc960563e014747ada31a60.tar.gz
Rename put_chunk into put_chunk_only and drop its checksum argument
-rw-r--r--obnamlib/repo.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/obnamlib/repo.py b/obnamlib/repo.py
index 27814b4f..97f28989 100644
--- a/obnamlib/repo.py
+++ b/obnamlib/repo.py
@@ -626,16 +626,9 @@ class Repository(object):
def _chunk_filename(self, chunkid):
return self.chunk_idpath.convert(chunkid)
- def put_chunk(self, data, checksum):
+ def put_chunk_only(self, data):
'''Put chunk of data into repository.
- checksum is the checksum of the data, and must be the same
- value as returned by self.checksum(data). However, since all
- known use cases require the caller to know the checksum before
- calling this method, and since computing checksums is
- expensive, we micro-optimize a little bit by passing it as
- an argument.
-
If the same data is already in the repository, it will be put there
a second time. It is the caller's responsibility to check
that the data is not already in the repository.
@@ -647,7 +640,6 @@ class Repository(object):
def random_chunkid():
return random.randint(0, obnamlib.MAX_ID)
- tracing.trace('putting chunk (checksum=%s)', repr(checksum))
self.require_started_generation()
if self.prev_chunkid is None: