Merge "Fix errors with issubclass() in Python 3.7"

This commit is contained in:
Zuul 2018-08-09 20:53:47 +00:00 committed by Gerrit Code Review
commit 6832a64542
1 changed files with 2 additions and 1 deletions

View File

@ -366,7 +366,8 @@ def parse(functions, stack, snippet, path='', template=None):
if Func is not None:
try:
path = '.'.join([path, fn_name])
if issubclass(Func, function.Macro):
if (isinstance(Func, type) and
issubclass(Func, function.Macro)):
return Func(stack, fn_name, args,
functools.partial(recurse, path=path),
template)