Skip to content

Commit

Permalink
Arreglado un error en el check del tipo de archivo.
Browse files Browse the repository at this point in the history
  • Loading branch information
YM162 committed Apr 28, 2022
1 parent 098118d commit dd9931c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions PDFU/PDFU_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def deembed(pdf_path):
return_path: If successful, returns the path of the deembedded file.
Error: If unsuccessful, returns a description of the error.
'''

print("Trying to Deembed:",pdf_path)
return_msg={"Success":False,"return_path":"","Error":""}
try:
if pdf_path[:-4]!=".pdf":
if pdf_path[-4:]!=".pdf":
return_msg["Success"]=False
return_msg["Error"]="File is not a .pdf file."
return return_msg
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = PDFU
version = 0.1.0
version = 0.1.2
author = YM162
author_email = [email protected]
description = PDF Unembedder for PDFPage objects
Expand Down
Binary file removed tests/testpdf/test.pdf
Binary file not shown.

0 comments on commit dd9931c

Please sign in to comment.