Skip to content

Commit 59e2b2b

Browse files
committed
fix(tests): deprecate base64.decodestring()
1 parent e890eab commit 59e2b2b

File tree

1 file changed

+1
-1
lines changed
  • contentcuration/contentcuration/utils

1 file changed

+1
-1
lines changed

contentcuration/contentcuration/utils/files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def write_base64_to_file(encoding, fpath_out):
157157
raise AssertionError("Error writing to file: Invalid base64 encoding")
158158

159159
with open(fpath_out, "wb") as target_file:
160-
target_file.write(base64.decodestring(encoding_match.group(2).encode('utf-8')))
160+
target_file.write(base64.decodebytes(encoding_match.group(2).encode('utf-8')))
161161

162162

163163
def create_thumbnail_from_base64(encoding, file_format_id=file_formats.PNG, preset_id=None, uploaded_by=None):

0 commit comments

Comments
 (0)