Use util wrapper for getpass

This allows for tests to run without prompting for user input.
This commit is contained in:
Greg Bodnar 2019-08-04 13:21:40 +12:00
parent 02f853b545
commit 290bb96daa

View file

@ -39,7 +39,7 @@ class EncryptedJournal(Journal.Journal):
filename = filename or self.config['journal']
if not os.path.exists(filename):
password = getpass.getpass("Enter password for new journal: ")
password = util.getpass("Enter password for new journal: ")
if password:
if util.yesno("Do you want to store the password in your keychain?", default=True):
util.set_keychain(self.name, password)