File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ def compare_preferences(prof1, prof2):
62
62
else :
63
63
return False
64
64
65
+ def compare_metadata (prof1 , prof2 ):
66
+ if "metadata" in prof1 and "metadata" in prof2 :
67
+ return prof1 ["metadata" ] == prof2 ["metadata" ]
68
+ elif "metadata" not in prof1 and "metadata" not in prof2 :
69
+ return True
70
+ else :
71
+ return False
72
+
65
73
def compare_components (prof1 , prof2 ):
66
74
if len (prof1 ["components" ]) == len (prof2 ["components" ]):
67
75
for y , new_component in enumerate (prof1 ["components" ]):
@@ -119,6 +127,7 @@ def compare_components(prof1, prof2):
119
127
- preferences must be the same
120
128
'''
121
129
if (compare_preferences (new_profile_map , current_profile_map ) == True and
130
+ compare_metadata (new_profile_map , current_profile_map ) == True and
122
131
compare_components (new_profile_map , current_profile_map ) == True ):
123
132
print ("%s and %s are duplicates!\n " % (new_profile , current_profile ))
124
133
duplicate_pairs .append ((new_profile , current_profile ))
You can’t perform that action at this time.
0 commit comments