mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 18:07:37 +03:00
seek(0) before sys.stdout.truncate()
Without this we only truncate to where the file was when we did the stdout/err redirect. What I observed was it truncated out the "journal locking" output, but not anything from a prior run of the program.
This commit is contained in:
parent
831367c30b
commit
11b1c436a7
@ -242,6 +242,8 @@ if __name__ == '__main__': # noqa: C901
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
# Now that we're sure we're the only instance running we can truncate the logfile
|
||||
logger.trace('Truncating plain logfile')
|
||||
sys.stdout.seek(0)
|
||||
sys.stdout.truncate()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user