From a06bb4d135b7e103e80b314511c9f742e3a3916f Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Tue, 24 May 2016 17:30:24 +0200 Subject: [PATCH 1/2] #221 Guarantee .to_text response to be str --- senza/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/senza/cli.py b/senza/cli.py index 2c509dfd..f7d7cd02 100755 --- a/senza/cli.py +++ b/senza/cli.py @@ -982,7 +982,7 @@ def status(stack_ref, region, output, w, watch): except: answers = [] for answer in answers: - if answer.target.to_text().startswith('{}-'.format(stack.StackName)): + if str(answer.target.to_text()).startswith('{}-'.format(stack.StackName)): main_dns_resolves = True instances = list(ec2.instances.filter(Filters=[{'Name': 'tag:aws:cloudformation:stack-id', From 0c823cbb658c88c664f392e5c35c5e5f613b81cd Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Mon, 30 May 2016 17:28:35 +0200 Subject: [PATCH 2/2] #221 Use decode method --- senza/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/senza/cli.py b/senza/cli.py index f7d7cd02..aede0fe1 100755 --- a/senza/cli.py +++ b/senza/cli.py @@ -982,7 +982,10 @@ def status(stack_ref, region, output, w, watch): except: answers = [] for answer in answers: - if str(answer.target.to_text()).startswith('{}-'.format(stack.StackName)): + target = answer.target.to_text() + if isinstance(target, bytes): + target = target.decode() + if target.startswith('{}-'.format(stack.StackName)): main_dns_resolves = True instances = list(ec2.instances.filter(Filters=[{'Name': 'tag:aws:cloudformation:stack-id',