From b5acb8b71e3daf284451a705386aee4964651802 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 1 Apr 2016 10:53:14 -0700 Subject: [PATCH] add add domain --- letsencrypt/cli.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 256e0c801..587a66faf 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -876,6 +876,22 @@ class WebrootPathProcessor(argparse.Action): # pylint: disable=missing-docstrin args.webroot_path.append(webroot) +def add_domain(args_or_config, domain): + """Registers a new domain to be used during the current client run. + + If all domains in domain have been registered, this function has no + effect. + + :param args_or_config: parsed command line arguments + :type args_or_config: argparse.Namespace or + configuration.NamespaceConfig + :param str domain: one or more comma separated domains + + """ + args_or_config.domains.extend(le_util.enforce_domain_sanity(d.strip()) + for d in domain.split(",") if d not in args_or_config.domains) + + def process_domain(args_or_config, domain_arg, webroot_path=None): """ Process a new -d flag, helping the webroot plugin construct a map of