Pull request #40: replace trace log level by debug
Merge in RR/image-prediction from adjust-falsy-loglevel to master
Squashed commit of the following:
commit 66794acb1a64be6341f98c7c0ce0bc202634a9f4
Author: Julius Unverfehrt <julius.unverfehrt@iqser.com>
Date: Fri Feb 10 10:15:41 2023 +0100
replace trace log level by debug
- trace method is not supported by buld-in logging module
This commit is contained in:
parent
5cdf93b923
commit
ea301b4df2
@ -201,7 +201,7 @@ def extract_pixmap(doc: Doc, xref: int) -> Pxm:
|
||||
except ValueError as err:
|
||||
msg = f"Cross reference {xref} is invalid, skipping extraction."
|
||||
logger.error(err)
|
||||
logger.trace(msg)
|
||||
logger.debug(msg)
|
||||
raise BadXref(msg) from err
|
||||
|
||||
|
||||
@ -214,16 +214,16 @@ def has_alpha_channel(doc: Doc, xref: int) -> bool:
|
||||
def error(value) -> str:
|
||||
return f"Invalid soft mask {value} for cross reference {cross_reference}."
|
||||
|
||||
logger.trace(f"Getting soft mask handle for cross reference {cross_reference}.")
|
||||
logger.debug(f"Getting soft mask handle for cross reference {cross_reference}.")
|
||||
pass_on_if_not_none = iffy(notnone, right(identity), left(error))
|
||||
return _get_image_handle(cross_reference).then(itemgetter("smask")).either(left(identity), pass_on_if_not_none)
|
||||
|
||||
def mask_exists(soft_mask_reference: int) -> Either:
|
||||
logger.trace(f"Checking if soft mask exists for soft mask reference {soft_mask_reference}.")
|
||||
logger.debug(f"Checking if soft mask exists for soft mask reference {soft_mask_reference}.")
|
||||
return _get_image_handle(soft_mask_reference).then(notnone)
|
||||
|
||||
def image_has_alpha_channel(reference: int) -> Either:
|
||||
logger.trace(f"Checking if image with reference {reference} has alpha channel.")
|
||||
logger.debug(f"Checking if image with reference {reference} has alpha channel.")
|
||||
return _extract_pixmap(reference).then(attrgetter("alpha")).then(bool)
|
||||
|
||||
logger.debug(f"Checking if image with cross reference {xref} has alpha channel.")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user