drewThomasson commited on
Commit
f942b86
1 Parent(s): 75e7db8

fix f-string errors

Browse files
Files changed (1) hide show
  1. lib/functions.py +4 -2
lib/functions.py CHANGED
@@ -936,7 +936,8 @@ def convert_ebook(args):
936
  session['client'] = docker.from_env()
937
 
938
  session['tmp_dir'] = os.path.join(processes_dir, f"ebook-{session['id']}")
939
- session['chapters_dir'] = os.path.join(session['tmp_dir'], f'chapters_{hashlib.md5(args['ebook'].encode()).hexdigest()}')
 
940
  session['chapters_dir_sentences'] = os.path.join(session['chapters_dir'], 'sentences')
941
 
942
  if not is_gui_process:
@@ -1009,7 +1010,8 @@ def convert_ebook(args):
1009
  else:
1010
  error = 'convert_to_epub() failed!'
1011
  else:
1012
- error = f'Temporary directory {session['tmp_dir']} not removed due to failure.'
 
1013
  else:
1014
  error = f"Language {args['language']} is not supported."
1015
  if session['cancellation_requested']:
 
936
  session['client'] = docker.from_env()
937
 
938
  session['tmp_dir'] = os.path.join(processes_dir, f"ebook-{session['id']}")
939
+ session['chapters_dir'] = os.path.join(session['tmp_dir'], f"chapters_{hashlib.md5(args['ebook'].encode()).hexdigest()}")
940
+
941
  session['chapters_dir_sentences'] = os.path.join(session['chapters_dir'], 'sentences')
942
 
943
  if not is_gui_process:
 
1010
  else:
1011
  error = 'convert_to_epub() failed!'
1012
  else:
1013
+ error = f"Temporary directory {session['tmp_dir']} not removed due to failure."
1014
+
1015
  else:
1016
  error = f"Language {args['language']} is not supported."
1017
  if session['cancellation_requested']: