Skip to content

Commit

Permalink
fix list.get brainfart
Browse files Browse the repository at this point in the history
  • Loading branch information
shotwn committed Apr 5, 2020
1 parent 07fb651 commit 333887a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ def connect_pyuipc(self):
sim_offset = self.create_offset_set({'SIM_VERSION': [0x3308, 'b']})
result = sim_offset.read()
self.pyuipc_open = result['SIM_VERSION']
self.opened_sim = SIMULATORS.get(self.pyuipc_open, 'SIM_VERSION', f'Unknown Sim: {self.pyuipc_open}')
try:
self.opened_sim = SIMULATORS[self.pyuipc_open]
except IndexError:
self.opened_sim = f'Unknown Sim: {self.pyuipc_open}'

return True

def close_pyuipc(self):
Expand Down

0 comments on commit 333887a

Please sign in to comment.