OK, break out ternary operator (good to know that it slowed you down to read it)

This commit is contained in:
Michael Gundlach
2010-08-24 13:37:18 -04:00
parent e6f3b718ef
commit 4fdd18a9d8

View File

@@ -212,7 +212,10 @@ class Controller(object):
del arg_dict['action']
arg_dict['req'] = req
result = method(**arg_dict)
return self._serialize(result, req) if type(result) is dict else result
if type(result) is dict:
return self._serialize(result, req)
else:
return result
def _serialize(self, data, request):
"""