diff --git a/pypugjs/runtime.py b/pypugjs/runtime.py index d874a01..fc32180 100644 --- a/pypugjs/runtime.py +++ b/pypugjs/runtime.py @@ -60,10 +60,10 @@ def extract_classes(cls): for k, v in attrs: if undefined is not None and isinstance(v, undefined): continue - if v is not None and (v or type(v) != bool): + if v is not None and (v or type(v) is not bool): if k == 'class': v = u' '.join(extract_classes(v)) - t = v and type(v) == bool + t = v and type(v) is bool if t and not terse: v = k buf.append(u'%s' % k if terse and t else u'%s="%s"' % (k, escape(v)))