From 7f2394337d534725cc0c0a07e12c30498caddb4b Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 10 Nov 2013 15:59:09 -0500 Subject: [PATCH] get_dependencies returns a set --- gramps/gen/merge/diff.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gramps/gen/merge/diff.py b/gramps/gen/merge/diff.py index ebce791df..b469a3f7a 100644 --- a/gramps/gen/merge/diff.py +++ b/gramps/gen/merge/diff.py @@ -217,19 +217,19 @@ def get_dependencies(struct): objects. """ if isinstance(struct, HandleClass): - return [(struct.classname, str(struct))] + return set([(struct.classname, str(struct))]) elif isinstance(struct, (tuple, list)): - retval = [] + retval = set([]) for item in struct: - retval.extend(get_dependencies(item)) + retval.update(get_dependencies(item)) return retval elif isinstance(struct, dict): - retval = [] + retval = set([]) for key in struct.keys(): - retval.extend(get_dependencies(struct[key])) + retval.update(get_dependencies(struct[key])) return retval else: - return [] + return set([]) class Struct(object): """