Close standard streams on exit

Prevents the warning: "ResourceWarning: unclosed file"
This commit is contained in:
Nick Hall 2023-07-12 21:40:53 +01:00
parent cea2da1b3c
commit 1f5dd216bf

View File

@ -619,5 +619,8 @@ def main():
for error in errors: for error in errors:
logging.warning(error[0] + error[1]) logging.warning(error[0] + error[1])
sys.stdout.close()
sys.stderr.close()
if __name__ == '__main__': if __name__ == '__main__':
main() main()