Browse Source

replace `else: if:` with a literal `elif`

pull/341/head
Hexiro 4 years ago
committed by Rossen
parent
commit
083d1a9a23
  1. 3
      steam/client/__init__.py
  2. 9
      steam/webauth.py

3
steam/client/__init__.py

@ -297,8 +297,7 @@ class SteamClient(CMClient, BuiltinBase):
""" """
if not self.connected: if not self.connected:
self._LOG.debug("Trying to send message when not connected. (discarded)") self._LOG.debug("Trying to send message when not connected. (discarded)")
else: elif body_params and isinstance(message, MsgProto):
if body_params and isinstance(message, MsgProto):
proto_fill_from_dict(message.body, body_params) proto_fill_from_dict(message.body, body_params)
CMClient.send(self, message) CMClient.send(self, message)

9
steam/webauth.py

@ -179,8 +179,7 @@ class WebAuth(object):
if password: if password:
self.password = password self.password = password
else: elif self.password:
if self.password:
password = self.password password = self.password
else: else:
raise LoginIncorrect("password is not specified") raise LoginIncorrect("password is not specified")
@ -339,16 +338,14 @@ class MobileWebAuth(WebAuth):
""" """
if oauth_token: if oauth_token:
self.oauth_token = oauth_token self.oauth_token = oauth_token
else: elif self.oauth_token:
if self.oauth_token:
oauth_token = self.oauth_token oauth_token = self.oauth_token
else: else:
raise LoginIncorrect('token is not specified') raise LoginIncorrect('token is not specified')
if steam_id: if steam_id:
self.steam_id = SteamID(steam_id) self.steam_id = SteamID(steam_id)
else: elif not self.steam_id:
if not self.steam_id:
raise LoginIncorrect('steam_id is not specified') raise LoginIncorrect('steam_id is not specified')
steam_id = self.steam_id.as_64 steam_id = self.steam_id.as_64

Loading…
Cancel
Save