Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
minor logging message change
Browse files Browse the repository at this point in the history
  • Loading branch information
9FS committed Feb 10, 2024
1 parent 83db742 commit f323ad0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ license = "MIT"
name = "x" # can't leave empty because of bug with `poetry install` from poetry.lock file
readme = "readme.md"
repository = "https://github.com/9-FS/2022-10-23-nHentai-to-PDF-Server"
version = "3.0.3"
version = "3.0.4"

[tool.poetry.dependencies]
kfsconfig = "^1.0.0"
Expand Down
6 changes: 3 additions & 3 deletions src/Hentai.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def download(self, library_path: str, library_split: int) -> bytes:
- Hentai.DownloadError:
- \"{PDF_filepath}\" already exists as directory.
- Can't generate page URL for {self} page {i+1}, because media type \"{page['t']}\" is unknown.
- Tried to download and convert hentai \"{self}\" several times, but failed.
- Tried to download and convert hentai {self} several times, but failed.
"""

images_filepath: list[str]=[] # where to cache downloaded images
Expand Down Expand Up @@ -252,8 +252,8 @@ def download(self, library_path: str, library_split: int) -> bytes:
self.PDF_filepath=PDF_filepath # save PDF filepath
break # break out
else: # if giving up:
logging.error(f"Tried to download and convert hentai \"{self}\" several times, but failed. Giving up.")
raise KFSmedia.DownloadError(f"Error in {self.download.__name__}{inspect.signature(self.download)}: Tried to download and convert hentai \"{self}\" several times, but failed. Giving up.")
logging.error(f"Tried to download and convert hentai {self} several times, but failed. Giving up.")
raise KFSmedia.DownloadError(f"Error in {self.download.__name__}{inspect.signature(self.download)}: Tried to download and convert hentai {self} several times, but failed. Giving up.")


if os.path.isdir(os.path.join(library_path, str(self.ID))) and len(os.listdir(os.path.join(library_path, str(self.ID))))==0: # if cache folder still exists and is empty:
Expand Down

0 comments on commit f323ad0

Please sign in to comment.