##// END OF EJS Templates
templatefilters: use safehasattr instead of hasattr
Augie Fackler -
r14967:376091a4 default
parent child Browse files
Show More
@@ -188,7 +188,7 b' def json(obj):'
188 188 return '"%s"' % jsonescape(u)
189 189 elif isinstance(obj, unicode):
190 190 return '"%s"' % jsonescape(obj)
191 elif hasattr(obj, 'keys'):
191 elif util.safehasattr(obj, 'keys'):
192 192 out = []
193 193 for k, v in obj.iteritems():
194 194 s = '%s: %s' % (json(k), json(v))
General Comments 0
You need to be logged in to leave comments. Login now