1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-08 05:20:03 +03:00

td.py: Fix 'oops' with file header wrt platform

Lost the `sys.platform == ` part of:

    `sys.platform == 'darwin' and ...`
This commit is contained in:
Athanasius 2022-12-08 11:42:57 +00:00
parent 75ee57939a
commit 78e9db710f
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

3
td.py
View File

@ -1,6 +1,7 @@
"""Export data for Trade Dangerous."""
import pathlib
import sys
import time
from collections import defaultdict
from operator import itemgetter
@ -31,7 +32,7 @@ def export(data: CAPIData) -> None:
with open(data_path / data_filename, 'wb') as h:
# Format described here: https://bitbucket.org/kfsone/tradedangerous/wiki/Price%20Data
h.write('#! trade.py import -\n'.encode('utf-8'))
this_platform = 'darwin' and "Mac OS" or system()
this_platform = sys.platform == 'darwin' and "Mac OS" or system()
cmdr_name = data['commander']['name'].strip()
h.write(
f'# Created by {applongname} {appversion()} on {this_platform} for Cmdr {cmdr_name}.\n'.encode('utf-8')