Bug 912488 - Add extra debugging output to woo_mailer.py; r=edmorley
authorMark Cote <mcote@mozilla.com>
Wed, 04 Sep 2013 15:11:07 +0100
changeset 213 2eea03ef6c29461ad686ccc3f1abacffad752372
parent 212 69227c8d99cf97e068904c1f95c29954831649e1
child 214 09721bf442973f77fca6e545e1233d19f46461bf
push id201
push useremorley@mozilla.com
push dateWed, 04 Sep 2013 14:11:31 +0000
reviewersedmorley
bugs912488
Bug 912488 - Add extra debugging output to woo_mailer.py; r=edmorley
woo_mailer.py
--- a/woo_mailer.py
+++ b/woo_mailer.py
@@ -73,21 +73,26 @@ class TopBugs(object):
         bug_array.sort(key=lambda x: x[1], reverse=True)
         return bug_array
 
     def bug_details(self, buglist):
         jdata = self.get_bugdata('/bugdetails?bugid=%s' % ','.join(buglist))
         return jdata['bugs']
 
     def get_json(self, url_path):
-        data = urllib2.urlopen(self.local_server_url + url_path).read()
+        url = self.local_server_url + url_path
+        print 'Getting JSON from %s.' % url
+        data = urllib2.urlopen(url).read()
+        print 'Results: %s' % data
         return json.loads(data)
 
     def get_bugdata(self, url_path):
+        print 'Getting bug data from %s.' % url_path
         if url_path in self.bugdata:
+            print 'Found in cache: %s' % self.bugdata
             return self.bugdata[url_path]
         jdata = self.get_json(url_path)
         self.bugdata[url_path] = jdata
         return jdata
 
     def get_bybug(self):
         return self.get_bugdata('/bybug?tree=trunk&startday=%s&endday=%s' % (self.startday, self.endday))