[ocrfeeder] Remove unnecessary variable when importing a PDF
- From: Joaquim Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Remove unnecessary variable when importing a PDF
- Date: Sun, 8 Mar 2020 20:55:16 +0000 (UTC)
commit 774b066d25eb1d4d56b700837cab2695e0017e9d
Author: Joaquim Rocha <me joaquimrocha com>
Date: Sun Mar 8 21:50:37 2020 +0100
Remove unnecessary variable when importing a PDF
It was assigned to the argument value and used only once.
src/ocrfeeder/util/lib.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/ocrfeeder/util/lib.py b/src/ocrfeeder/util/lib.py
index 8f5016b..f2013e0 100644
--- a/src/ocrfeeder/util/lib.py
+++ b/src/ocrfeeder/util/lib.py
@@ -67,7 +67,6 @@ def convertPdfToImages(pdf_file, temp_dir = '/tmp'):
file_name = os.path.basename(pdf_file)
base_name = os.path.splitext(file_name)[0]
- pdf_path = pdf_file
file_name_safe = getSafeGhostscriptInputFilename(file_name)
base_name_safe = getSafeGhostscriptOutputBasename(base_name)
pdf_file_safe = getSafeGhostscriptPath(pdf_file)
@@ -89,7 +88,7 @@ def convertPdfToImages(pdf_file, temp_dir = '/tmp'):
except:
debug('PDF conversion warning: Cannot remove temp symlink: %s', pdf_path_safe)
else:
- runGhostscript(dir_name, base_name_safe, pdf_path)
+ runGhostscript(dir_name, base_name_safe, pdf_file)
return dir_name
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]