Skip to content

Commit

Permalink
Address Pylint new unspecified-encoding warning
Browse files Browse the repository at this point in the history
Read more about the warning here:
pylint-dev/pylint#3826

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
  • Loading branch information
MVrachev committed Aug 23, 2021
1 parent e9106b5 commit 9991b9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tuf/developer_tool.py
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion tuf/unittest_toolbox.py
Expand Up @@ -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
Expand Down

0 comments on commit 9991b9f

Please sign in to comment.