diff options
-rwxr-xr-x | archivemail.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/archivemail.py b/archivemail.py index 37f1449..2fd6f89 100755 --- a/archivemail.py +++ b/archivemail.py @@ -1310,6 +1310,8 @@ def _archive_imap(mailbox_name, final_archive_name): try: imap_username, imap_password = imap_username.split(':', 1) except ValueError: + if (not os.isatty(sys.stdin.fileno())) or options.quiet: + unexpected_error("No imap password specified") imap_password = getpass.getpass() if mailbox_name[:5] == 'imaps': |