Andargor / edce-client

Elite Dangerous Companion Emulator
MIT License
49 stars 13 forks source link

Updated search for players ships to pass indices to data.ships so it can be retrieved #23

Closed syberphunk closed 8 years ago

syberphunk commented 8 years ago

Example error:

Traceback (most recent call last): File "./player_dump.py", line 45, in starsystem = data.ships[ship].starsystem TypeError: list indices must be integers or slices, not edict

Changed to: starsystem = data.ships[data.ships.index(ship)].starsystem

This returns the indices correctly where the ship exists in the dictionary.

Replaced as appropriate in code. Tested against Python 3.5

Andargor commented 8 years ago

I've reverted this change, since it breaks on my system (3.4.3). We'll have to find a way to satisfy your version.