diff --git a/copyparty/ico.py b/copyparty/ico.py index 3ef812de..89973e88 100644 --- a/copyparty/ico.py +++ b/copyparty/ico.py @@ -45,7 +45,7 @@ class Ico(object): pb = ImageDraw.Draw(img) tw, th = pb.textsize(ext) pb.text(((w - tw) // 2, (h - th) // 2), ext, fill="#" + c[6:]) - img = img.resize((w * 3, h * 3), Image.Resampling.NEAREST) + img = img.resize((w * 3, h * 3), Image.NEAREST) buf = BytesIO() img.save(buf, format="PNG", compress_level=1) diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index 8a1d6e15..75d9051f 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -266,13 +266,14 @@ class ThumbSrv(object): if fun: try: fun(abspath, tpath) - except: + except Exception as ex: msg = "{} could not create thumbnail of {}\n{}" msg = msg.format(fun.__name__, abspath, min_ex()) c: Union[str, int] = 1 if "