diff --git a/helpers/write_apkg.py b/helpers/write_apkg.py index 23faf6d..c5be23b 100644 --- a/helpers/write_apkg.py +++ b/helpers/write_apkg.py @@ -66,12 +66,14 @@ def _write_new_apkg(deck_payloads, media_files): if e.errno == 36: # File name too long # Handle the error, e.g., shorten the filename or move to a different directory print("File name too long. Shortening filename.") - tmp_file.name = f'{truncated_name[:max_name_length - 10]}-truncated-{first_deck_id}.apkg' + tmp_file.name = ( + f'{truncated_name[:max_name_length - 10]}-truncated-{first_deck_id}.apkg' + ) package.write_to_file(tmp_file.name) else: raise e # Re-raise other exceptions - final_path = os.path.join(os.getcwd() , tmp_file.name) + final_path = os.path.join(os.getcwd(), tmp_file.name) os.rename(tmp_file.name, final_path) - sys.stdout.write(final_path) \ No newline at end of file + sys.stdout.write(final_path)