From 9ad9558664959a3d4f8705e609a8ae5ed19937fe Mon Sep 17 00:00:00 2001 From: Anmol Gulati Date: Fri, 18 May 2018 19:48:30 +0530 Subject: [PATCH] Fallback to _response_dict if _rootkey is not present in response dict This is the case while fetching some of the reports. I particularly found this in '_GET_XML_RETURNS_DATA_BY_RETURN_DATE_'. In this case the data is returned but not in rootkey. This will at least let the user parse the data on there own --- mws/mws.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mws/mws.py b/mws/mws.py index 0525044a..b1620e6f 100644 --- a/mws/mws.py +++ b/mws/mws.py @@ -134,7 +134,7 @@ def parsed(self): Provides access to the parsed contents of an XML response as a tree of ObjectDicts. """ if self._rootkey: - return self._response_dict.get(self._rootkey) + return self._response_dict.get(self._rootkey, self._response_dict) return self._response_dict