From: Mark Wooding Date: Sun, 24 May 2015 15:49:40 +0000 (+0100) Subject: pwsafe: Get the master passphrase before the new password. X-Git-Tag: 1.1.0~15 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/commitdiff_plain/f39dc0c877f1e53559b3767a1e3d4bc08c38ab3d pwsafe: Get the master passphrase before the new password. This saves lots of repeating the new password if the user is prone to typing the master password wrongly. Like I am. --- diff --git a/pwsafe b/pwsafe index 37ebffe..8a51bd7 100644 --- a/pwsafe +++ b/pwsafe @@ -102,6 +102,7 @@ def cmd_store(av): if len(av) < 1 or len(av) > 2: return 1 tag = av[0] + pw = PW(file, writep = True) if len(av) < 2: pp = C.getpass("Enter passphrase `%s': " % tag) vpp = C.getpass("Confirm passphrase `%s': " % tag) @@ -110,7 +111,6 @@ def cmd_store(av): pp = stdin.readline() else: pp = av[1] - pw = PW(file, writep = True) pw[av[0]] = chomp(pp) def cmd_copy(av):