Skip to content

Commit

Permalink
checks if mfa_code is already defined (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-rajaraman authored and joshfraser committed Dec 31, 2018
1 parent dccc35e commit a789918
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion csv-export.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@

logged_in = robinhood.login(username=username, password=password)
if logged_in != True and logged_in.get('non_field_errors') == None and logged_in['mfa_required'] == True:
mfa_code = os.getenv("RH_MFA")

if mfa_code is None:
mfa_code = os.getenv("RH_MFA")

if mfa_code == "":
print("Robinhood MFA:", end=' ')
try:
Expand Down

0 comments on commit a789918

Please sign in to comment.