Skip to content

Commit

Permalink
Fixed a typo in some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kataiser committed Aug 9, 2018
1 parent 8f17a50 commit 327913b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions TF2 Rich Presence/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def loop_body(self):
# connects to Discord
self.client = ipc.DiscordIPC('429389143756374017')
self.client.connect()
self.client_state: Tuple[Any, bool, str, int, str, Any] = (self.client.client_id, self.client.connected, self.client.ipc_path, self.client.pid, self.client.platform, self.client.socket)
self.client_state: Tuple[Any, bool, str, int, str, Any] = (
self.client.client_id, self.client.connected, self.client.ipc_path, self.client.pid, self.client.platform, self.client.socket)
log.debug(f"Initial client state: {self.client_state}")
except Exception as client_connect_error:
if client_connect_error == "Can't connect to Discord Client.": # Discord is still running but an RPC client can't be established
Expand Down Expand Up @@ -174,7 +175,7 @@ def loop_body(self):
self.client.update_activity(self.activity)
log.debug(f"Sent over RPC: {self.activity}")
self.client_state = (self.client.client_id, self.client.connected, self.client.ipc_path, self.client.pid, self.client.platform, self.client.socket)
log.debug(f"self.client state: {self.client_state}")
log.debug(f"client state: {self.client_state}")
if not self.client_connected:
log.critical('self.client is disconnected')
log.report_log("self.client disconnect")
Expand All @@ -187,7 +188,7 @@ def loop_body(self):
log.debug("Disconnecting client")
self.client.disconnect() # doesn't work...
self.client_state = (self.client.client_id, self.client.connected, self.client.ipc_path, self.client.pid, self.client.platform, self.client.socket)
log.debug(f"self.client state after disconnect: {self.client_state}")
log.debug(f"client state after disconnect: {self.client_state}")
except Exception as err:
log.error(f"client error while disconnecting: {err}")

Expand All @@ -207,7 +208,7 @@ def interpret_console_log(console_log_path: str, user_usernames: list, line_limi
# defaults
current_map: str = ''
current_class: str = ''

match_types: Dict[str, str] = {'match group 12v12 Casual Match': 'Casual', 'match group MvM Practice': 'MvM', 'match group 6v6 Ladder Match': 'Competitive'}
disconnect_messages = ('Server shutting down', 'Steam config directory', 'Lobby destroyed', 'Disconnect:', 'Missing map')
tf2_classes = ('Scout', 'Soldier', 'Pyro', 'Demoman', 'Heavy', 'Engineer', 'Medic', 'Sniper', 'Spy')
Expand Down

0 comments on commit 327913b

Please sign in to comment.