Browse Source

Change tempfile open mode to 'w'

- Previously was 'w+b' (default)
- Will fix #2426
byungnam 4 years ago
parent
commit
2e6e13487d
1 changed files with 1 additions and 0 deletions
  1. 1 0
      desktop/core/src/desktop/lib/metrics/file_reporter.py

+ 1 - 0
desktop/core/src/desktop/lib/metrics/file_reporter.py

@@ -46,6 +46,7 @@ class FileReporter(Reporter):
     # rename the file to the real location.
     # rename the file to the real location.
 
 
     f = tempfile.NamedTemporaryFile(
     f = tempfile.NamedTemporaryFile(
+        mode='w',
         dir=dirname,
         dir=dirname,
         delete=False)
         delete=False)