]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
safer get by falling back to a dictionary
authorAlfredo Deza <alfredo@deza.pe>
Fri, 19 Jul 2013 12:59:53 +0000 (08:59 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Fri, 19 Jul 2013 12:59:53 +0000 (08:59 -0400)
teuthology/queue.py

index d0ad70a09a8902c7baec07a6ff469afa9d9bd573..3a308899d37318a3e367f3f0dd17b64de87bca25 100644 (file)
@@ -81,7 +81,7 @@ describe. One job is run at a time.
         log.debug('Config is: %s', job.body)
         job_config = yaml.safe_load(job.body)
         safe_archive = safepath.munge(job_config['name'])
-        teuthology_branch=job_config.get('config').get('teuthology_branch', 'master')
+        teuthology_branch = job_config.get('config', {}).get('teuthology_branch', 'master')
 
         teuth_path = os.path.join(os.getenv("HOME"), 'teuthology-' + teuthology_branch, 'virtualenv', 'bin')
         if not os.path.isdir(teuth_path):