From 868a294b6bd66b66e78d149aa2135df3c8a2a8b0 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 13 Sep 2019 14:36:43 +0100 Subject: [PATCH] Switches to .format() for startup code. --- EDMarketConnector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index cb9903b9..67a00313 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -800,8 +800,8 @@ if __name__ == "__main__": if getattr(sys, 'frozen', False): # By default py2exe tries to write log to dirname(sys.executable) which fails when installed import tempfile - sys.stdout = sys.stderr = open(join(tempfile.gettempdir(), '%s.log' % appname), 'wt', 1) # unbuffered not allowed for text in python3, so use line buffering - print('%s %s %s' % (applongname, appversion, strftime('%Y-%m-%dT%H:%M:%S', localtime()))) + sys.stdout = sys.stderr = open(join(tempfile.gettempdir(), '{}.log'.format(appname)), 'wt', 1) # unbuffered not allowed for text in python3, so use line buffering + print('{} {} {}'.format(applongname, appversion, strftime('%Y-%m-%dT%H:%M:%S', localtime()))) Translations.install(config.get('language') or None) # Can generate errors so wait til log set up