From 4d2dfab4dda7e81e7a09246fd10d34b518001adf Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Mon, 25 Mar 2019 21:22:56 +0100 Subject: [PATCH] Simplify a branching that is not totally covered. (#6881) --- certbot-apache/certbot_apache/parser.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/certbot-apache/certbot_apache/parser.py b/certbot-apache/certbot_apache/parser.py index 148f052d0..b9f23f6cf 100644 --- a/certbot-apache/certbot_apache/parser.py +++ b/certbot-apache/certbot_apache/parser.py @@ -93,12 +93,7 @@ class ApacheParser(object): # Add new path to parser paths new_dir = os.path.dirname(inc_path) new_file = os.path.basename(inc_path) - if new_dir in self.existing_paths.keys(): - # Add to existing path - self.existing_paths[new_dir].append(new_file) - else: - # Create a new path - self.existing_paths[new_dir] = [new_file] + self.existing_paths.setdefault(new_dir, []).append(new_file) def add_mod(self, mod_name): """Shortcut for updating parser modules."""