bug 1338150 swap to using .get() so previous 'None' behaviour continues r=jlorenzo FENNEC_52_0b6_BUILD1 FENNEC_52_0b6_RELEASE
authorSimon Fraser <sfraser@mozilla.com>
Mon, 13 Feb 2017 16:55:55 +0000
changeset 7310 6bcacf2803ea8de56c6b8f7f25edb0f99987de91
parent 7309 7adbdc3a85be868b35f4d15f8237d0227d0188fc
child 7311 5a22b599c500234ef43949c893673eb026730330
push id5443
push usersfraser@mozilla.com
push dateMon, 13 Feb 2017 17:16:00 +0000
reviewersjlorenzo
bugs1338150
bug 1338150 swap to using .get() so previous 'None' behaviour continues r=jlorenzo MozReview-Commit-ID: BL9mxuCSix9
buildfarm/release/release-runner.py
--- a/buildfarm/release/release-runner.py
+++ b/buildfarm/release/release-runner.py
@@ -306,40 +306,40 @@ def main(options):
     username = config['api']['username']
     password = config['api']['password']
 
     rr_config = config['release-runner']
 
     buildbot_configs = rr_config['buildbot_configs']
     buildbot_configs_branch = rr_config['buildbot_configs_branch']
     sleeptime = rr_config['sleeptime']
-    notify_from = rr_config['notify_from']
-    notify_to = rr_config['notify_to_announce']
-    docker_worker_key = rr_config['docker_worker_key']
-    signing_pvt_key = config['signing']['pvt_key']
+    notify_from = rr_config.get('notify_from')
+    notify_to = rr_config.get('notify_to_announce')
+    docker_worker_key = rr_config.get('docker_worker_key')
+    signing_pvt_key = config['signing'].get('pvt_key')
     if isinstance(notify_to, basestring):
         notify_to = [x.strip() for x in notify_to.split(',')]
     smtp_server = rr_config.get('smtp_server', 'localhost')
     tc_config = {
         "credentials": {
             "clientId": config['taskcluster'].get('client_id'),
             "accessToken": config['taskcluster'].get('access_token'),
         }
     }
     # Extend tc_config for retries, see Bug 1293744
     # https://github.com/taskcluster/taskcluster-client.py/blob/0.0.24/taskcluster/client.py#L30
     # This is a stopgap until Bug 1259627 is fixed.
     retrying_tc_config = tc_config.copy()
     retrying_tc_config.update({"maxRetries": 12})
-    balrog_username = config['balrog']["username"]
-    balrog_password = config["balrog"]["password"]
-    extra_balrog_submitter_params = config["balrog"]["extra_balrog_submitter_params"]
-    beetmover_aws_access_key_id = config["beetmover"]["aws_access_key_id"]
-    beetmover_aws_secret_access_key = config["beetmover"]["aws_secret_access_key"]
-    gpg_key_path = config["signing"]["gpg_key_path"]
+    balrog_username = config['balrog'].get("username")
+    balrog_password = config["balrog"].get("password")
+    extra_balrog_submitter_params = config["balrog"].get("extra_balrog_submitter_params")
+    beetmover_aws_access_key_id = config["beetmover"].get("aws_access_key_id")
+    beetmover_aws_secret_access_key = config["beetmover"].get("aws_secret_access_key")
+    gpg_key_path = config["signing"].get("gpg_key_path")
 
     # TODO: replace release sanity with direct checks of en-US and l10n
     # revisions (and other things if needed)
 
     rr = ReleaseRunner(api_root=api_root, username=username, password=password)
     scheduler = Scheduler(retrying_tc_config)
     index = Index(tc_config)
     queue = Queue(tc_config)