Browse Source

fix reset_attribute sometimes raising AttributeError

pull/18/merge
Rossen Georgiev 9 years ago
parent
commit
d60c9f222b
  1. 25
      steam/core/cm.py

25
steam/core/cm.py

@ -116,19 +116,18 @@ class CMClient(EventEmitter):
self.emit('disconnected') self.emit('disconnected')
def _reset_attributes(self): def _reset_attributes(self):
del self.current_server_addr for name in ['current_server_addr',
del self.connected 'connected',
del self.channel_secured 'channel_secured',
'key',
del self.key 'hmac_secret',
del self.hmac_secret 'steam_id',
'session_id',
del self.steam_id 'webapi_authenticate_user_nonce',
del self.session_id '_recv_loop',
del self.webapi_authenticate_user_nonce '_heartbeat_loop',
]:
del self._recv_loop self.__dict__.pop(name, None)
del self._heartbeat_loop
def send_message(self, message): def send_message(self, message):
""" """

Loading…
Cancel
Save