From f4b2a46541da9e17ee5372c260e09d1976d1a506 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Sun, 9 Jun 2013 14:16:59 +0300 Subject: Raise AttributeError on invalid key access --- gsxws/xmltodict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gsxws') diff --git a/gsxws/xmltodict.py b/gsxws/xmltodict.py index 430df3e..f041eb5 100644 --- a/gsxws/xmltodict.py +++ b/gsxws/xmltodict.py @@ -21,7 +21,7 @@ class XmlDictObject(dict): try: v = self.__getitem__(item) except KeyError: - return + raise AttributeError("Invalid attribute: %s" % item) if item in ["packingList", "proformaFileData", "returnLabelFileData"]: v = base64.b64decode(v) -- cgit v1.2.3