mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01:00
Use warn method in IliasCrawler
This commit is contained in:
parent
8a42a2a396
commit
e0b46a306a
@ -111,9 +111,11 @@ class IliasCrawler:
|
|||||||
LOGGER.debug("Processing folder-like...")
|
LOGGER.debug("Processing folder-like...")
|
||||||
return self._switch_on_folder_like(path, link_element, url)
|
return self._switch_on_folder_like(path, link_element, url)
|
||||||
|
|
||||||
LOGGER.warning("Got unknown type, %r, %r, %r", path, link_element, url)
|
PRETTY.warn(
|
||||||
# TODO: Other types
|
"Got unknown element type in switch. I am not sure what horror I found on the"
|
||||||
raise Exception("Implement me!")
|
f" ILIAS page. The element was at {str(path)!r} and it is {link_element!r})"
|
||||||
|
)
|
||||||
|
return []
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _crawl_file(path: Path, link_element: bs4.Tag, url: str) -> List[IliasDownloadInfo]:
|
def _crawl_file(path: Path, link_element: bs4.Tag, url: str) -> List[IliasDownloadInfo]:
|
||||||
|
@ -40,6 +40,12 @@ def enable_logging(name: str = "PFERD", level: int = logging.INFO) -> None:
|
|||||||
colorama.init()
|
colorama.init()
|
||||||
|
|
||||||
|
|
||||||
|
class FatalException(Exception):
|
||||||
|
"""
|
||||||
|
A fatal exception occurred. Recovery is not possible.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
class PrettyLogger:
|
class PrettyLogger:
|
||||||
"""
|
"""
|
||||||
A logger that prints some specially formatted log messages in color.
|
A logger that prints some specially formatted log messages in color.
|
||||||
|
Loading…
Reference in New Issue
Block a user