aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-06-09 14:16:59 +0300
committerFilipp Lepalaan <f@230.to>2013-06-09 14:16:59 +0300
commitf4b2a46541da9e17ee5372c260e09d1976d1a506 (patch)
tree7a02cbcdcc61ef557e4bfeffba66bb78a29f1525
parent6f8f3480a324e7384572ff49c0cb86e72f48b3d6 (diff)
downloadpy-gsxws-f4b2a46541da9e17ee5372c260e09d1976d1a506.tar.gz
py-gsxws-f4b2a46541da9e17ee5372c260e09d1976d1a506.tar.bz2
py-gsxws-f4b2a46541da9e17ee5372c260e09d1976d1a506.zip
Raise AttributeError on invalid key access
-rw-r--r--gsxws/xmltodict.py2
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)