mirror of
https://github.com/apache/superset.git
synced 2024-09-07 06:17:45 -04:00
fix: log exceptions for thumbnail generation as warnings (#13737)
* log errors for thumbnail generation as warnings * fix: ex_info -> exc_info
This commit is contained in:
parent
592c566bb4
commit
31b14dcc88
@ -151,13 +151,13 @@ class BaseScreenshot:
|
|||||||
try:
|
try:
|
||||||
payload = self.get_screenshot(user=user, window_size=window_size)
|
payload = self.get_screenshot(user=user, window_size=window_size)
|
||||||
except Exception as ex: # pylint: disable=broad-except
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
logger.error("Failed at generating thumbnail %s", ex)
|
logger.warning("Failed at generating thumbnail %s", ex, exc_info=True)
|
||||||
|
|
||||||
if payload and window_size != thumb_size:
|
if payload and window_size != thumb_size:
|
||||||
try:
|
try:
|
||||||
payload = self.resize_image(payload, thumb_size=thumb_size)
|
payload = self.resize_image(payload, thumb_size=thumb_size)
|
||||||
except Exception as ex: # pylint: disable=broad-except
|
except Exception as ex: # pylint: disable=broad-except
|
||||||
logger.error("Failed at resizing thumbnail %s", ex)
|
logger.warning("Failed at resizing thumbnail %s", ex, exc_info=True)
|
||||||
payload = None
|
payload = None
|
||||||
|
|
||||||
if payload:
|
if payload:
|
||||||
|
Loading…
Reference in New Issue
Block a user