mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-13 07:47:14 +03:00
Replaced or magic with multiline if
Abusing ors for that is incredibly confusing. Additionally, I replaced the .join() call with a static .format call, as the join is confusing for no reason
This commit is contained in:
parent
82fce9e8c0
commit
87ad0f3080
@ -149,7 +149,14 @@ def export(data, filename=None):
|
||||
|
||||
# Construct description
|
||||
ship = ship_map.get(data['ship']['name'].lower(), data['ship']['name'])
|
||||
string = '[%s]\n' % (data['ship'].get('shipName') and ', '.join([ship, data['ship']['shipName']]) or ship)
|
||||
|
||||
if data['ship'].get('shipName') is not None:
|
||||
_ships = '{}, {}'.format(ship, data['ship']['shipName'])
|
||||
else:
|
||||
_ships = ship
|
||||
|
||||
string = '[{}]\n'.format(_ships)
|
||||
|
||||
for slot in ['H', 'L', 'M', 'S', 'U', None, 'BH', 'RB', 'TM', 'FH', 'EC', 'PC', 'SS', 'FS', None, 'MC', None, '9', '8', '7', '6', '5', '4', '3', '2', '1']:
|
||||
if not slot:
|
||||
string += '\n'
|
||||
|
Loading…
x
Reference in New Issue
Block a user