Skip to content

Commit

Permalink
added better handling for steam guard
Browse files Browse the repository at this point in the history
  • Loading branch information
DJSchaffner committed Dec 16, 2023
1 parent 3f3abd1 commit 2e55c2a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def _depot_downloader(self, options: list):
responses = [
"result: OK",
"Please enter .*: ",
"STEAM GUARD!",
pexpect.EOF
]

Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 2e55c2a

Please sign in to comment.