From 92506b1f6d5949d441cf8123e5e95386ff32f393 Mon Sep 17 00:00:00 2001 From: sydneyli Date: Mon, 6 Jan 2020 14:16:57 -0800 Subject: [PATCH] address comments --- certbot-apache/certbot_apache/apacheparser.py | 14 +++++++------- certbot-apache/certbot_apache/interfaces.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/certbot-apache/certbot_apache/apacheparser.py b/certbot-apache/certbot_apache/apacheparser.py index bdfb1bc7b..43328d6df 100644 --- a/certbot-apache/certbot_apache/apacheparser.py +++ b/certbot-apache/certbot_apache/apacheparser.py @@ -28,7 +28,7 @@ class ApacheParserNode(interfaces.ParserNode): """Find ancestor BlockNodes with a given name""" return [ApacheBlockNode(name=assertions.PASS, parameters=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata)] @@ -101,7 +101,7 @@ class ApacheBlockNode(ApacheDirectiveNode): """Adds a new BlockNode to the sequence of children""" new_block = ApacheBlockNode(name=assertions.PASS, parameters=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata) self.children += (new_block,) @@ -111,7 +111,7 @@ class ApacheBlockNode(ApacheDirectiveNode): """Adds a new DirectiveNode to the sequence of children""" new_dir = ApacheDirectiveNode(name=assertions.PASS, parameters=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata) self.children += (new_dir,) @@ -122,7 +122,7 @@ class ApacheBlockNode(ApacheDirectiveNode): """Adds a new CommentNode to the sequence of children""" new_comment = ApacheCommentNode(comment=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata) self.children += (new_comment,) @@ -132,7 +132,7 @@ class ApacheBlockNode(ApacheDirectiveNode): """Recursive search of BlockNodes from the sequence of children""" return [ApacheBlockNode(name=assertions.PASS, parameters=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata)] @@ -140,14 +140,14 @@ class ApacheBlockNode(ApacheDirectiveNode): """Recursive search of DirectiveNodes from the sequence of children""" return [ApacheDirectiveNode(name=assertions.PASS, parameters=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata)] def find_comments(self, comment, exact=False): # pylint: disable=unused-argument """Recursive search of DirectiveNodes from the sequence of children""" return [ApacheCommentNode(comment=assertions.PASS, - ancestors=self, + ancestors=(self), filepath=assertions.PASS, metadata=self.metadata)] diff --git a/certbot-apache/certbot_apache/interfaces.py b/certbot-apache/certbot_apache/interfaces.py index e8e1b2351..da9684d6e 100644 --- a/certbot-apache/certbot_apache/interfaces.py +++ b/certbot-apache/certbot_apache/interfaces.py @@ -132,8 +132,8 @@ class ParserNode(object): ParserNode objects should have the following attributes: # Reference to ancestor node(s), empty if the node is the root node of the - # configuration tree. This node can have multiple ancestors in the case - # that it is the root of a file included by multiple files. + # configuration tree. This node can have multiple ancestors if it is in + # a file included by multiple files. ancestors: Tuple[ParserNode] # True if this node has been modified since last save.