From 4d1b2539d2d2f39ca53e9383e317af76dbc71905 Mon Sep 17 00:00:00 2001 From: Michael Gundlach Date: Tue, 24 Aug 2010 13:37:18 -0400 Subject: OK, break out ternary operator (good to know that it slowed you down to read it) --- nova/wsgi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova') diff --git a/nova/wsgi.py b/nova/wsgi.py index 096d5843f..bec0a7b1c 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -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): """ -- cgit