[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] In addSnap(), check snapshots for data key before continuing (#433824)





David Cantrell wrote:
data may not exist in the snapshots hash.  If it isn't there, return
to caller.
---
 partitions.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)



Looks good to me,

Regards,

Hans


diff --git a/partitions.py b/partitions.py
index a9b658e..74a9e11 100644
--- a/partitions.py
+++ b/partitions.py
@@ -1756,6 +1756,8 @@ class Partitions:
         lvm_parent_deletes = []
         tmp = {}
         def addSnap(name, vg):
+            if not snapshots.has_key(name):
+                return
             snaps = snapshots[name]
             for snap, snapvg in snaps:
                 addSnap(snap, snapvg)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]