summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/configdict.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 157011839..a723c5322 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -78,3 +78,11 @@ def retrieve_config(path_hash, base_path, config):
config_hash[k][node] = retrieve_config(inner_hash, path + [node], config)
return config_hash
+
+
+def list_diff(first, second):
+ """
+ Diff two dictionaries and return only unique items
+ """
+ second = set(second)
+ return [item for item in first if item not in second]