diff options
author | Filipp Lepalaan <f@230.to> | 2013-06-09 14:16:59 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-06-09 14:16:59 +0300 |
commit | f4b2a46541da9e17ee5372c260e09d1976d1a506 (patch) | |
tree | 7a02cbcdcc61ef557e4bfeffba66bb78a29f1525 | |
parent | 6f8f3480a324e7384572ff49c0cb86e72f48b3d6 (diff) | |
download | py-gsxws-f4b2a46541da9e17ee5372c260e09d1976d1a506.tar.gz py-gsxws-f4b2a46541da9e17ee5372c260e09d1976d1a506.tar.bz2 py-gsxws-f4b2a46541da9e17ee5372c260e09d1976d1a506.zip |
Raise AttributeError on invalid key access
-rw-r--r-- | gsxws/xmltodict.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |