diff --git a/src/logic.py b/src/logic.py index acbfd6e..d1e504c 100644 --- a/src/logic.py +++ b/src/logic.py @@ -6,6 +6,7 @@ import pexpect import pexpect.popen_spawn +import tkinter import tkinter.simpledialog from steam.client import SteamClient @@ -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")