]> git.ipfire.org Git - oddments/ddns.git/blobdiff - src/ddns/system.py
Log HTTP header for status codes != 200
[oddments/ddns.git] / src / ddns / system.py
index cab2942aba4c101eb4da157225527e238d99c579..6b763335dca40730c4d890da3ab8718571ebae98 100644 (file)
@@ -166,6 +166,11 @@ class DDNSSystem(object):
                        return resp
 
                except urllib2.HTTPError, e:
+                       # Log response header.
+                       logger.debug(_("Response header (Status Code %s):") % e.code)
+                       for k, v in e.hdrs.items():
+                               logger.debug("  %s: %s" % (k, v))
+
                        # 400 - Bad request
                        if e.code == 400:
                                raise DDNSRequestError(e.reason)