From f8443c250fd54d6885df06f1540549be72fa8362 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Wed, 30 Mar 2016 07:18:34 +0100 Subject: [PATCH] reorder _pre_login; no changes --- steam/client/__init__.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/steam/client/__init__.py b/steam/client/__init__.py index 475423d..227e2dd 100644 --- a/steam/client/__init__.py +++ b/steam/client/__init__.py @@ -255,17 +255,6 @@ class SteamClient(EventEmitter, FeatureBase): return None return response[0].body - def _pre_login(self): - if self.logged_on: - logger.debug("Trying to login while logged on???") - raise RuntimeError("Already logged on") - - if not self.connected: - self.connect() - - if not self.cm.channel_secured: - self.wait_event("channel_secured") - def _get_sentry_path(self, username): if self.credential_location is not None: return os.path.join(self.credential_location, @@ -316,6 +305,17 @@ class SteamClient(EventEmitter, FeatureBase): return False + def _pre_login(self): + if self.logged_on: + logger.debug("Trying to login while logged on???") + raise RuntimeError("Already logged on") + + if not self.connected: + self.connect() + + if not self.cm.channel_secured: + self.wait_event("channel_secured") + def login(self, username, password, auth_code=None, two_factor_code=None): """ Login as a specific user