Fix bz2 command (#2299)

Details:
Cast bz2content to str to avoid type error. (TypeError: write() argument must be str, not bytes)

Testing:
Local testing was done.

Associated Issues:
N/A

Co-authored-by: Carrie Roberts <clr2of8@gmail.com>
This commit is contained in:
yonatanS1
2023-01-26 22:12:30 +02:00
committed by GitHub
parent 6c872029ee
commit ae3d762b50
+1 -1
View File
@@ -57,7 +57,7 @@ atomic_tests:
name: bash
elevation_required: false
command: |
$which_python -c "import bz2;input_file=open('#{path_to_input_file}','rb');content=input_file.read();input_file.close();bz2content=bz2.compress(content,compresslevel=9);output_file=open('#{path_to_output_file}','w+');output_file.write(bz2content);output_file.close();"
$which_python -c "import bz2;input_file=open('#{path_to_input_file}','rb');content=input_file.read();input_file.close();bz2content=bz2.compress(content,compresslevel=9);output_file=open('#{path_to_output_file}','w+');output_file.write(str(bz2content));output_file.close();"
cleanup_command: |
rm #{path_to_output_file}
- name: Compressing data using zipfile in Python (Linux)