Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions ch03/gmail/gmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This is a command line utility for slurping emails from gmail and storing them as avro documents.
# I uses the GmailSlurper class, which in turn uses email utils.

import os, sys, getopt
import os, sys, getopt, getpass
from lepl.apps.rfc3696 import Email

from gmail_slurper import GmailSlurper
Expand Down Expand Up @@ -35,7 +35,12 @@ def main():
output_path = None
single_id = None
arg_check = dict()


# Request password without echoing to commandline.
if '-p' not in sys.argv[1:]:
password = getpass.getpass()
arg_check['-p'] = 1

for o, a in opts:
if o == "-m":
mode = a
Expand Down