From 862cb47da9c4d49ed205d4df796e32de01f810a2 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Thu, 18 Apr 2019 05:44:02 +0200 Subject: [PATCH] Make container objects comparable --- restic_volume_backup/containers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/restic_volume_backup/containers.py b/restic_volume_backup/containers.py index fbf732c..121db9a 100644 --- a/restic_volume_backup/containers.py +++ b/restic_volume_backup/containers.py @@ -131,6 +131,9 @@ class Container: return value.split(',') + def __eq__(self, other): + return self.id == other.id + class Mount: """Represents a volume mount (volume or bind)"""