Use the fixed getpass for calibredb as well

This commit is contained in:
Kovid Goyal 2017-08-04 13:27:09 +05:30
parent 9a9703242e
commit 50b9eb613f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -124,7 +124,7 @@ def read_credentials(opts):
pw = opts.password pw = opts.password
if pw: if pw:
if pw == '<stdin>': if pw == '<stdin>':
import getpass from calibre.utils.getpass import getpass
pw = getpass.getpass(_('Enter the password: ')) pw = getpass.getpass(_('Enter the password: '))
elif pw.startswith('<f:') and pw.endswith('>'): elif pw.startswith('<f:') and pw.endswith('>'):
with lopen(pw[3:-1], 'rb') as f: with lopen(pw[3:-1], 'rb') as f: