diff options
author | TW <tw@waldmann-edv.de> | 2023-02-20 18:07:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 18:07:21 +0100 |
commit | 3f2aac8f001793227491d940eacc8cb74ad4cabc (patch) | |
tree | 5ef2eb07f541f25e50e2e62e4cd919ac63c41afb | |
parent | 93a4bd61f81872a10e640c2b18575df60beb4be1 (diff) | |
parent | a08a3eb1731e04a3d6c3d51669c31c7f74091950 (diff) |
Merge pull request #7368 from vhadzhiev/vhadzhiev_contribution
fixed Statistics.__add__(), fixes #7355
-rw-r--r-- | src/borg/archive.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/borg/archive.py b/src/borg/archive.py index 0cd81e784..3c277ce08 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -79,8 +79,8 @@ class Statistics: stats.nfiles = self.nfiles + other.nfiles stats.chunking_time = self.chunking_time + other.chunking_time stats.hashing_time = self.hashing_time + other.hashing_time - for key in other.files_stats: - stats.files_stats[key] = self.files_stats[key] + other.files_stats[key] + st1, st2 = self.files_stats, other.files_stats + stats.files_stats = defaultdict(int, {key: (st1[key] + st2[key]) for key in st1.keys() | st2.keys()}) return stats |