From 2a28c0e509601de489fe4efc581a30a3d4c9e2e9 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sat, 2 May 2020 19:16:52 +0100 Subject: [PATCH] docs and recipe tweaks --- docs/user_guide.rst | 2 +- recipes/1.Login/diy_one_off_login.py | 6 +++--- recipes/2.SimpleWebAPI/steam_worker.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 4741e0a..7790e3b 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -161,7 +161,7 @@ After that we logout. .. code:: python - from steam.steamid import SteamClient + from steam.client import SteamClient from steam.enums.emsg import EMsg client = SteamClient() diff --git a/recipes/1.Login/diy_one_off_login.py b/recipes/1.Login/diy_one_off_login.py index de60dd9..868311f 100644 --- a/recipes/1.Login/diy_one_off_login.py +++ b/recipes/1.Login/diy_one_off_login.py @@ -7,7 +7,7 @@ print("One-off login recipe") print("-"*20) LOGON_DETAILS = { - 'username': raw_input("Steam user: "), + 'username': input("Steam user: "), 'password': getpass("Password: "), } @@ -20,10 +20,10 @@ def error(result): @client.on('auth_code_required') def auth_code_prompt(is_2fa, mismatch): if is_2fa: - code = raw_input("Enter 2FA Code: ") + code = input("Enter 2FA Code: ") client.login(two_factor_code=code, **LOGON_DETAILS) else: - code = raw_input("Enter Email Code: ") + code = input("Enter Email Code: ") client.login(auth_code=code, **LOGON_DETAILS) diff --git a/recipes/2.SimpleWebAPI/steam_worker.py b/recipes/2.SimpleWebAPI/steam_worker.py index 760f85a..51bf50b 100644 --- a/recipes/2.SimpleWebAPI/steam_worker.py +++ b/recipes/2.SimpleWebAPI/steam_worker.py @@ -4,7 +4,7 @@ from binascii import hexlify from steam.client import SteamClient from steam.core.msg import MsgProto from steam.enums.emsg import EMsg -from steam.util import proto_to_dict +from steam.utils.proto import proto_to_dict import vdf LOG = logging.getLogger("Steam Worker")