Skip to content

Commit 395fddf

Browse files
fix broken login examples after recent changes
fix #78
1 parent 0aed599 commit 395fddf

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

docs/user_guide.rst

+10-4
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,21 @@ After that we logout.
162162
.. code:: python
163163
164164
from steam import SteamClient
165-
from steam.enums import EResult
166165
from steam.enums.emsg import EMsg
167166
168167
client = SteamClient()
168+
169+
@client.on(EMsg.ClientVACBanStatus)
170+
def print_vac_status(msg):
171+
print("Number of VAC Bans: %s" % msg.body.numBans)
172+
169173
client.cli_login()
170174
171-
msg = client.wait_msg(EMsg.ClientAccountInfo)
172-
print "Logged on as: %s" % msg.body.persona_name
173-
print "SteamID: %s" % repr(client.steam_id)
175+
print("Logged on as: %s" % client.user.name)
176+
print("Community profile: %s" % client.steam_id.community_url)
177+
print("Last logon: %s" % client.user.last_logon)
178+
print("Last logoff: %s" % client.user.last_logoff)
179+
print("Number of friends: %d" % len(client.friends))
174180
175181
client.logout()
176182

recipes/1.Login/diy_one_off_login.py

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def auth_code_prompt(is_2fa, mismatch):
2929

3030
try:
3131
client.login(**LOGON_DETAILS)
32-
client.wait_event('logged_on')
3332
except:
3433
raise SystemExit
3534

recipes/1.Login/one_off_login.py

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
raise SystemExit
1515

1616
print("-"*20)
17-
18-
client.wait_event('logged_on')
19-
2017
print("Logged on as:", client.user.name)
2118
print("Community profile:", client.steam_id.community_url)
2219
print("Last logon:", client.user.last_logon)

0 commit comments

Comments
 (0)