From 79997e5a1852ab33ae73cfb3c06afb4142c40bd1 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Wed, 23 Jan 2019 16:56:19 -0800 Subject: [PATCH] dynamic partition update order is deterministic. Use an OrderedDict. Test: builds Change-Id: Ic3782c1961f0c2a735540b054eb3cace720c50bd --- tools/releasetools/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index de3e3b8b4..04158943d 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -2226,7 +2226,7 @@ class DynamicPartitionsDifference(object): collections.Counter(e.partition for e in block_diffs).items() if count > 1]) - self._partition_updates = dict() + self._partition_updates = collections.OrderedDict() for p, block_diff in block_diff_dict.items(): self._partition_updates[p] = DynamicPartitionUpdate() @@ -2277,7 +2277,7 @@ class DynamicPartitionsDifference(object): logger.info("Updating dynamic partitions %s", self._partition_updates.keys()) - self._group_updates = dict() + self._group_updates = collections.OrderedDict() for g in tgt_groups: self._group_updates[g] = DynamicGroupUpdate()