diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-12-16 14:52:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 14:52:04 +0000 |
commit | 3ad699cc65dc55d4329a59a5f621ac4dadaa0fc5 (patch) | |
tree | eee8d933b6f89d0840e85d7646f8f43de7fb7b5c | |
parent | Do not assume that the contents dictionary includes history_visibility. (#8945) (diff) | |
download | synapse-3ad699cc65dc55d4329a59a5f621ac4dadaa0fc5.tar.xz |
Fix generate_log_config script (#8952)
It used to write an empty file if you gave it a -o arg.
-rw-r--r-- | changelog.d/8952.misc | 1 | ||||
-rwxr-xr-x | scripts/generate_log_config | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/8952.misc b/changelog.d/8952.misc new file mode 100644 index 0000000000..4c4a874649 --- /dev/null +++ b/changelog.d/8952.misc @@ -0,0 +1 @@ +Fix bug in `generate_log_config` script which made it write empty files. diff --git a/scripts/generate_log_config b/scripts/generate_log_config index b6957f48a3..a13a5634a3 100755 --- a/scripts/generate_log_config +++ b/scripts/generate_log_config @@ -40,4 +40,6 @@ if __name__ == "__main__": ) args = parser.parse_args() - args.output_file.write(DEFAULT_LOG_CONFIG.substitute(log_file=args.log_file)) + out = args.output_file + out.write(DEFAULT_LOG_CONFIG.substitute(log_file=args.log_file)) + out.flush() |