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.