Browse Source

reorder _pre_login; no changes

pull/34/head
Rossen Georgiev 9 years ago
parent
commit
f8443c250f
  1. 22
      steam/client/__init__.py

22
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

Loading…
Cancel
Save