Rename option and fix displayed info

This commit is contained in:
Miquel Ruiz
2015-11-16 16:57:48 -08:00
committed by Peter Eckersley
parent 36842b7bbb
commit 99f9f1b106
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -139,7 +139,7 @@ def _determine_account(args, config):
elif len(accounts) == 1: elif len(accounts) == 1:
acc = accounts[0] acc = accounts[0]
else: # no account registered yet else: # no account registered yet
if args.email is None and not args.allow_unsafe_registration: if args.email is None and not args.register_unsafely_without_email:
args.email = display_ops.get_email() args.email = display_ops.get_email()
else: else:
args.email = None args.email = None
@@ -843,7 +843,7 @@ def prepare_and_parse_args(plugins, args):
None, "-t", "--text", dest="text_mode", action="store_true", None, "-t", "--text", dest="text_mode", action="store_true",
help="Use the text output instead of the curses UI.") help="Use the text output instead of the curses UI.")
helpful.add( helpful.add(
None, "--allow-unsafe-registration", action="store_true", None, "--register-unsafely-without-email", action="store_true",
help="Specifying this flag enables registering an account with no " help="Specifying this flag enables registering an account with no "
"email address. This is strongly discouraged, because in the " "email address. This is strongly discouraged, because in the "
"event of key loss or account compromise you will irrevocably " "event of key loss or account compromise you will irrevocably "
+4 -3
View File
@@ -124,9 +124,10 @@ def get_email():
""" """
while True: while True:
code, email = zope.component.getUtility(interfaces.IDisplay).input( code, email = zope.component.getUtility(interfaces.IDisplay).input(
"Enter email address (mandatory since no " "Enter email address "
"--allow-unsafe-registration was provided)" "(used for urgent notices and lost key recovery)\n\n"
"(used for urgent notices and lost key recovery)") "If you really want to skip this, run the client with "
"--register-unsafely-without-email")
if code == display_util.OK: if code == display_util.OK:
if le_util.safe_email(email): if le_util.safe_email(email):