We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6451a3 commit 49f9369Copy full SHA for 49f9369
1 file changed
cyclonedx/output/__init__.py
@@ -69,8 +69,8 @@ def output_to_file(self, filename: str, allow_overwrite: bool = False):
69
if os.path.exists(output_filename) and not allow_overwrite:
70
raise FileExistsError
71
72
- with open(output_filename, mode='w') as f_out:
73
- f_out.write(self.output_as_string(), encoding='utf-8')
+ with open(output_filename, mode='wb') as f_out:
+ f_out.write(self.output_as_string().encode('utf-8'))
74
75
f_out.close()
76
0 commit comments