From 2e55c2a4a9d287ce81a0dd727ca1201591f5a3d4 Mon Sep 17 00:00:00 2001 From: DJSchaffner Date: Sat, 16 Dec 2023 15:49:34 +0100 Subject: [PATCH] added better handling for steam guard --- src/logic.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/logic.py b/src/logic.py index c0e826e..abea4b8 100644 --- a/src/logic.py +++ b/src/logic.py @@ -284,6 +284,7 @@ def _depot_downloader(self, options: list): responses = [ "result: OK", "Please enter .*: ", + "STEAM GUARD!", pexpect.EOF ] @@ -292,7 +293,7 @@ def _depot_downloader(self, options: list): response = p.expect(responses, timeout=timeout) # Error - if response == 2: + if response == 3: raise ConnectionError("Error logging into account") # Code required @@ -317,6 +318,10 @@ def _depot_downloader(self, options: list): if p.expect(responses, timeout=timeout) == 1: raise ConnectionError("Invalid authentication code") + # Steam Guard + elif response == 2: + pass + # Wait for program to finish p.expect(pexpect.EOF, timeout=None) except pexpect.exceptions.TIMEOUT: