From 0349f3f1a38e9d77548158a6e33749e01f30ddaa Mon Sep 17 00:00:00 2001 From: Jake Moshenko Date: Thu, 26 Mar 2015 14:53:56 -0400 Subject: [PATCH] Handle the case where YAML config returns a list not a tuple. --- buildman/manager/ephemeral.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildman/manager/ephemeral.py b/buildman/manager/ephemeral.py index 40876cdf5..7e24094c8 100644 --- a/buildman/manager/ephemeral.py +++ b/buildman/manager/ephemeral.py @@ -157,8 +157,12 @@ class EphemeralBuilderManager(BaseManager): etcd_host = self._manager_config.get('ETCD_HOST', '127.0.0.1') etcd_port = self._manager_config.get('ETCD_PORT', 2379) - etcd_auth = self._manager_config.get('ETCD_CERT_AND_KEY', None) etcd_ca_cert = self._manager_config.get('ETCD_CA_CERT', None) + + etcd_auth = self._manager_config.get('ETCD_CERT_AND_KEY', None) + if etcd_auth is not None: + etcd_auth = tuple(etcd_auth) # Convert YAML list to a tuple + etcd_protocol = 'http' if etcd_auth is None else 'https' logger.debug('Connecting to etcd on %s:%s', etcd_host, etcd_port)