From d33da9bc7fc72d44846e462f6991cebfad4266cf Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Mon, 2 Oct 2017 12:26:25 -0700 Subject: [PATCH] Add docstring for create_new_vhost_from_default --- certbot-nginx/certbot_nginx/parser.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/certbot-nginx/certbot_nginx/parser.py b/certbot-nginx/certbot_nginx/parser.py index 27b3cfcb3..f4aa15208 100644 --- a/certbot-nginx/certbot_nginx/parser.py +++ b/certbot-nginx/certbot_nginx/parser.py @@ -314,6 +314,14 @@ class NginxParser(object): raise errors.MisconfigurationError("Problem in %s: %s" % (filename, str(err))) def create_new_vhost_from_default(self, vhost_template): + """Duplicate the default vhost in the configuration files. + + :param :class:`~certbot_nginx.obj.VirtualHost` vhost_template: The vhost + whose information we copy + + :returns: A vhost object for the newly created vhost + :rtype: :class:`~certbot_nginx.obj.VirtualHost` + """ # TODO: do the right thing for debian # put it in the same file as the template, at the same level enclosing_block = self.parsed[vhost_template.filep]