Skip to content

Commit f4ffb9d

Browse files
author
Jussi Kukkonen
authored
Merge pull request #1532 from MVrachev/pylint-warning
Address Pylint new unspecified-encoding warning
2 parents e9106b5 + 80fec6b commit f4ffb9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tuf/developer_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def _save_project_configuration(metadata_directory, targets_directory,
749749
project_config['public_keys'][key] = key_metadata
750750

751751
# Save the actual file.
752-
with open(project_filename, 'wt') as fp:
752+
with open(project_filename, 'wt', encoding='utf8') as fp:
753753
json.dump(project_config, fp)
754754

755755

tuf/unittest_toolbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _destroy_temp_file():
116116
def make_temp_data_file(self, suffix='', directory=None, data = 'junk data'):
117117
"""Returns an absolute path of a temp file containing data."""
118118
temp_file_path = self.make_temp_file(suffix=suffix, directory=directory)
119-
temp_file = open(temp_file_path, 'wt')
119+
temp_file = open(temp_file_path, 'wt', encoding='utf8')
120120
temp_file.write(data)
121121
temp_file.close()
122122
return temp_file_path

0 commit comments

Comments
 (0)