Merge pull request #1532 from MVrachev/pylint-warning

Address Pylint new unspecified-encoding warning
This commit is contained in:
Jussi Kukkonen 2021-08-23 18:01:20 +03:00 committed by GitHub
commit f4ffb9dbaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -749,7 +749,7 @@ def _save_project_configuration(metadata_directory, targets_directory,
project_config['public_keys'][key] = key_metadata
# Save the actual file.
with open(project_filename, 'wt') as fp:
with open(project_filename, 'wt', encoding='utf8') as fp:
json.dump(project_config, fp)

View file

@ -116,7 +116,7 @@ def _destroy_temp_file():
def make_temp_data_file(self, suffix='', directory=None, data = 'junk data'):
"""Returns an absolute path of a temp file containing data."""
temp_file_path = self.make_temp_file(suffix=suffix, directory=directory)
temp_file = open(temp_file_path, 'wt')
temp_file = open(temp_file_path, 'wt', encoding='utf8')
temp_file.write(data)
temp_file.close()
return temp_file_path