]> scripts.mit.edu Git - wizard.git/commitdiff
Log reponse code and headers.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 26 Jan 2017 23:33:15 +0000 (15:33 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 26 Jan 2017 23:33:15 +0000 (15:33 -0800)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
wizard/util.py

index 8f1d1ba4bff20ab9eb0ca7121febce9e4b51072f..47588e5482b39cd21e92dffea34ecaeddec4f0d7 100644 (file)
@@ -329,6 +329,8 @@ def fetch(host, path, subpath, post=None):
             logging.info("GET request to http://%s%s", host, fullpath)
             h.request("GET", fullpath)
         r = h.getresponse()
             logging.info("GET request to http://%s%s", host, fullpath)
             h.request("GET", fullpath)
         r = h.getresponse()
+        logging.debug("Response code: %d", r.status)
+        logging.debug("Response headers: %s", r.msg)
         data = r.read()
         h.close()
         return data
         data = r.read()
         h.close()
         return data