diff --git a/td.py b/td.py index cd2c0d3e..aa87a17b 100644 --- a/td.py +++ b/td.py @@ -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')