We have `S.rstrip()' instead.
moan(msg)
exit(1)
-def chomp(pp):
- """Return the string PP, without its trailing newline if it has one."""
- if len(pp) > 0 and pp[-1] == '\n':
- pp = pp[:-1]
- return pp
-
###--------------------------------------------------------------------------
### Subcommand implementations.
vpp = C.getpass("Confirm passphrase `%s': " % tag)
if pp != vpp: die("passphrases don't match")
elif av[1] == '-':
- pp = stdin.readline()
+ pp = stdin.readline().rstrip('\n')
else:
pp = av[1]
- pw[av[0]] = chomp(pp)
+ pw[av[0]] = pp
def cmd_copy(av):
if len(av) < 1 or len(av) > 2: return 1