From f850526a8c089b731145a5144a1c564373d23b20 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 29 Jan 2015 13:38:26 +0100 Subject: [PATCH] [IMP] don't make a temporary copy of dict keys --- auditlog/models/rule.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auditlog/models/rule.py b/auditlog/models/rule.py index 04be8f9e0..ce00d629d 100644 --- a/auditlog/models/rule.py +++ b/auditlog/models/rule.py @@ -39,8 +39,8 @@ class DictDiffer(object): """ def __init__(self, current_dict, past_dict): self.current_dict, self.past_dict = current_dict, past_dict - self.set_current = set(current_dict.keys()) - self.set_past = set(past_dict.keys()) + self.set_current = set(current_dict) + self.set_past = set(past_dict) self.intersect = self.set_current.intersection(self.set_past) def added(self):