Address review comments

This commit is contained in:
Peter Eckersley 2017-04-28 18:37:58 -07:00
parent 0a4ee306a9
commit f6c02728e4
2 changed files with 2 additions and 8 deletions

View file

@ -532,7 +532,6 @@ class HelpfulArgumentParser(object):
parsed_args = self.parser.parse_args(self.args)
parsed_args.func = self.VERBS[self.verb]
parsed_args.verb = self.verb
parsed_args.renewing = "unknown" # used for the User Agent; not known until later
if self.detect_defaults:
return parsed_args
@ -1106,7 +1105,7 @@ def _create_subparsers(helpful):
help="Set a custom user agent string for the client. User agent strings allow "
"the CA to collect high level statistics about success rates by OS, "
"plugin and use case, and to know when to deprecate support for past Python "
"versions. If you wish to hide this information from the Let's "
"versions and flags. If you wish to hide this information from the Let's "
'Encrypt server, set this to "". '
'(default: {0}). The flags encoded in the user agent are: '
'--duplicate, --force-renew, --allow-subset-of-names, -n, and '

View file

@ -54,14 +54,9 @@ def determine_user_agent(config):
"""
if config.user_agent is None:
if cli.cli_command in ["certbot", "letsencrypt", "certbot-auto", "letsencrypt-auto"]:
auto = cli.cli_command
else:
auto = "other"
ua = ("CertbotACMEClient/{0} ({1}; {2}) Authenticator/{3} Installer/{4} "
"({5}; flags: {6}) Py/{7}")
ua = ua.format(certbot.__version__, auto, util.get_os_info_ua(),
ua = ua.format(certbot.__version__, cli.cli_command, util.get_os_info_ua(),
config.authenticator, config.installer, config.verb,
ua_flags(config), platform.python_version())
else: