Mercurial > hg > MakeItSo
comparison makeitso/template.py @ 74:d16823fd8c4a
check for subclassing, not instance of
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 07 Jan 2011 18:14:21 -0800 |
parents | 3db48fdc6be3 |
children | ec35e5763b52 |
comparison
equal
deleted
inserted
replaced
73:3db48fdc6be3 | 74:d16823fd8c4a |
---|---|
52 | 52 |
53 def assemble(*args): | 53 def assemble(*args): |
54 names = set() | 54 names = set() |
55 retval = [] | 55 retval = [] |
56 for arg in args: | 56 for arg in args: |
57 if isinstance(arg, MakeItSoTemplate): | 57 if issubclass(arg, MakeItSoTemplate): |
58 arg = arg.vars | 58 arg = arg.vars |
59 for variable in arg: | 59 for variable in arg: |
60 if variable.name in names: | 60 if variable.name in names: |
61 continue | 61 continue |
62 retval.append(variable.copy()) | 62 retval.append(variable.copy()) |