Skip to content

Commit

Permalink
- Potential fix for 2FA code entry sometimes not working
Browse files Browse the repository at this point in the history
  • Loading branch information
DJSchaffner committed Aug 3, 2020
1 parent bb647de commit 2dfd51c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import pexpect
import pexpect.popen_spawn
import tkinter
import tkinter.simpledialog
from steam.client import SteamClient

Expand Down Expand Up @@ -223,8 +224,14 @@ def __download_depot(self, username: str, password: str, depot_id, manifest_id):

# Code required
elif i == 1:

# Open popup for 2FA Code
code = tkinter.simpledialog.askstring(title="Code", prompt="Please enter your 2FA login code")
# Create temporary parent window to prevent error with visibility
temp = tkinter.Tk()
temp.withdraw()
code = tkinter.simpledialog.askstring(title="Code", prompt="Please enter your 2FA login code", parent=temp)
temp.destroy()

# Cancel was clicked
if code is None:
raise ConnectionError("Invalid authentication code")
Expand Down

0 comments on commit 2dfd51c

Please sign in to comment.