summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-02-12 19:33:15 +0200
committerLars Wirzenius <liw@liw.fi>2017-02-12 19:33:15 +0200
commit9e60d6e2cfad8288f88307c919475306d00d762c (patch)
tree6d34286666dd488c02947e60a278878bfbf91492
parentc922d3a484433d26909a0df385105a5b705c4903 (diff)
downloadobnam-9e60d6e2cfad8288f88307c919475306d00d762c.tar.gz
Early break if chunks_to_remove becomes emptyliw/forget
-rw-r--r--obnamlib/fmt_ga/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/obnamlib/fmt_ga/client.py b/obnamlib/fmt_ga/client.py
index 0427fc31..a22c3419 100644
--- a/obnamlib/fmt_ga/client.py
+++ b/obnamlib/fmt_ga/client.py
@@ -236,6 +236,8 @@ class GAClient(object):
for chunk_id in self._generate_chunk_ids_in_generations(remaining):
if chunk_id in chunks_to_remove:
chunks_to_remove.remove(chunk_id)
+ if len(chunks_to_remove) == 0:
+ break
dumper.dump_memory_profile('after computing chunk uniq to removed gen')
self._generations.set_generations(remaining)