Always return an ODict from get_query

This commit is contained in:
Aldo Cortesi 2012-02-21 13:00:45 +13:00
parent d2f5db1f37
commit a4270efaf2

View File

@ -337,9 +337,9 @@ class Request(HTTPMsg):
Gets the request query string. Returns an ODict object. Gets the request query string. Returns an ODict object.
""" """
_, _, _, _, query, _ = urlparse.urlparse(self.get_url()) _, _, _, _, query, _ = urlparse.urlparse(self.get_url())
if not query: if query:
return []
return ODict(utils.urldecode(query)) return ODict(utils.urldecode(query))
return ODict([])
def set_query(self, odict): def set_query(self, odict):
""" """