mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-17 17:42:20 +03:00
Switches to .format() for startup code.
This commit is contained in:
parent
faf5bee834
commit
868a294b6b
@ -800,8 +800,8 @@ if __name__ == "__main__":
|
|||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
# By default py2exe tries to write log to dirname(sys.executable) which fails when installed
|
# By default py2exe tries to write log to dirname(sys.executable) which fails when installed
|
||||||
import tempfile
|
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
|
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('%s %s %s' % (applongname, appversion, strftime('%Y-%m-%dT%H:%M:%S', localtime())))
|
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
|
Translations.install(config.get('language') or None) # Can generate errors so wait til log set up
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user