From f02111aa887cfb7cbadb93627aededab51e89ab9 Mon Sep 17 00:00:00 2001 From: Kirill K Date: Sat, 17 Feb 2018 03:49:15 +0300 Subject: [PATCH] Make status check case insensitive --- namecheap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/namecheap.py b/namecheap.py index 05911ca..df7f4aa 100644 --- a/namecheap.py +++ b/namecheap.py @@ -130,7 +130,7 @@ def _fetch_xml(self, payload, extra_payload = None): print(r.text) xml = fromstring(r.text) - if xml.attrib['Status'] == 'ERROR': + if xml.attrib['Status'].upper() == 'ERROR': # Response namespace must be prepended to tag names. xpath = './/{%(ns)s}Errors/{%(ns)s}Error' % {'ns': NAMESPACE} error = xml.find(xpath)