aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-24 18:19:03 -0800
committerBryan Newbold <bnewbold@robocracy.org>2021-11-24 18:19:03 -0800
commit5a8661e647b27932bdccbaa3b6a445fd35518814 (patch)
tree9f821fa51e646e0e6b952fed521d09693585ef3b
parent0584499e7887d8c1ff216b27652d28c8377c3a17 (diff)
downloadfatcat-5a8661e647b27932bdccbaa3b6a445fd35518814.tar.gz
fatcat-5a8661e647b27932bdccbaa3b6a445fd35518814.zip
mergers: don't try to accept empty editgroups in dry-run-mode
-rw-r--r--python/fatcat_tools/mergers/common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/fatcat_tools/mergers/common.py b/python/fatcat_tools/mergers/common.py
index e25f8194..f8197519 100644
--- a/python/fatcat_tools/mergers/common.py
+++ b/python/fatcat_tools/mergers/common.py
@@ -111,7 +111,8 @@ class EntityMerger(EntityImporter):
else:
self.counts["skip"] += 1
if self._edit_count >= self.edit_batch_size:
- self.api.accept_editgroup(self._editgroup_id)
+ if not self.dry_run_mode:
+ self.api.accept_editgroup(self._editgroup_id)
self._editgroup_id = None
self._edit_count = 0
self._idents_inflight = []
@@ -128,7 +129,8 @@ class EntityMerger(EntityImporter):
def finish(self) -> Counter:
if self._edit_count > 0:
- self.api.accept_editgroup(self._editgroup_id)
+ if not self.dry_run_mode:
+ self.api.accept_editgroup(self._editgroup_id)
self._editgroup_id = None
self._edit_count = 0
self._idents_inflight = []