From 0aa6898218ea42494f501be61ec2a740e939e863 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 16 Jan 2018 20:50:55 -0800 Subject: [PATCH] play coverage games --- certbot-apache/certbot_apache/tests/http_01_test.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/certbot-apache/certbot_apache/tests/http_01_test.py b/certbot-apache/certbot_apache/tests/http_01_test.py index 8596fb370..1bc42c041 100644 --- a/certbot-apache/certbot_apache/tests/http_01_test.py +++ b/certbot-apache/certbot_apache/tests/http_01_test.py @@ -51,10 +51,7 @@ class ApacheHttp01Test(util.ApacheTest): # Find a vhost with a name/alias we can use for j in range(vhost_index + 1, len(self.config.vhosts)): vhost = self.config.vhosts[j] - if vhost.name: - domain = vhost.name - elif vhost.aliases: - domain = next(iter(vhost.aliases)) + domain = vhost.name if vhost.name else next(iter(vhost.aliases), None) if domain: self.vhosts.append(vhost) vhost_index = j + 1