Fixed an error in the code where options where removed by accident

This commit is contained in:
Joubin Jabbari 2016-12-23 19:26:14 -08:00
parent 4fc191fee9
commit 33698e7a7b

View File

@ -135,9 +135,23 @@ if __name__ == "__main__":
dest="two_factor", dest="two_factor",
default=False, default=False,
help="Use this option to enable two factor authentication",) help="Use this option to enable two factor authentication",)
parser.add_option("--username",
action="store",
dest="username",
default=False,
help="Audible username, use along with the --password option")
parser.add_option("--password",
action="store",
dest="password",
default=False,
help="Audible password")
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
username = raw_input("Username: ") if options.username and options.password:
password = getpass("Password: ") username = options.username
password = options.password
else:
username = raw_input("Username: ")
password = getpass("Password: ")
fetch_activation_bytes(username, password, options) fetch_activation_bytes(username, password, options)