Bug 1448985 - Change session header; r=me
authorGeoff Brown <gbrown@mozilla.com>
Tue, 27 Mar 2018 11:05:06 -0600
changeset 352 e6b2ecd3bff55feb0a54cea21df53b5be4ebef1b
parent 351 2aa142d2fec475f91d6bbf52e7315c49cff0e6b0
child 353 4dc7cd6e0bf2f999fff0e30f1a2bb9e397e641f7
push id299
push usergbrown@mozilla.com
push dateTue, 27 Mar 2018 17:05:33 +0000
reviewersme
bugs1448985
Bug 1448985 - Change session header; r=me
woo_commenter.py
--- a/woo_commenter.py
+++ b/woo_commenter.py
@@ -159,17 +159,17 @@ def main():
 
     template_defaults = {'weekly_mode': options.weekly_mode,
                          'start_date': start_date,
                          'end_date': end_date}
     tmpl = tempita.Template.from_filename(TEMPLATE_FILE, namespace=template_defaults)
 
     bmo_session = requests.Session()
     bmo_session.headers['User-Agent'] = 'orangefactor-commenter'
-    bmo_session.headers['X_BUGZILLA_API_KEY'] = bugzilla_api_key
+    bmo_session.headers['X-BUGZILLA-API-KEY'] = bugzilla_api_key
     # Use a custom HTTP adapter, so we can set a non-zero max_retries value.
     bmo_session.mount("https://", requests.adapters.HTTPAdapter(max_retries=3))
 
     # Fetch per-repository, per-platform and total failure counts for each bug.
     tb = TopBugs(local_server_url, start_date, end_date, tree='all')
     stats = tb.stats()
     bug_stats = tb.stats_by_bug()
     if options.weekly_mode: