summaryrefslogtreecommitdiff
path: root/obnamlib/fmt_ga/format.py
diff options
context:
space:
mode:
Diffstat (limited to 'obnamlib/fmt_ga/format.py')
-rw-r--r--obnamlib/fmt_ga/format.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/obnamlib/fmt_ga/format.py b/obnamlib/fmt_ga/format.py
index dfda1cc0..8e4b787b 100644
--- a/obnamlib/fmt_ga/format.py
+++ b/obnamlib/fmt_ga/format.py
@@ -27,10 +27,10 @@ class RepositoryFormatGA(obnamlib.RepositoryDelegator):
obnamlib.RepositoryDelegator.__init__(self, **kwargs)
self.set_client_list_object(obnamlib.GAClientList())
- self.set_client_factory(obnamlib.GAClient)
+ self.set_client_factory(self._client_factory)
self.set_chunk_indexes_object(obnamlib.GAChunkIndexes())
- assert 'checksum_algorithm' in kwargs
+ self._checksum_algorithm = kwargs['checksum_algorithm']
self._chunk_indexes.set_default_checksum_algorithm(
kwargs['checksum_algorithm'])
@@ -41,6 +41,11 @@ class RepositoryFormatGA(obnamlib.RepositoryDelegator):
chunk_store.set_chunk_cache_size(kwargs['chunk_cache_size'])
self.set_chunk_store_object(chunk_store)
+ def _client_factory(self, client_name):
+ client = obnamlib.GAClient(client_name)
+ client.set_default_checksum_algorithm(self._checksum_algorithm)
+ return client
+
def init_repo(self):
pass