Loco-CTO / Rystal-V6-Experiments

Exceptions are overlapping PYL-W0714
Anti-pattern
Major
2 months ago2 months old
Overlapping exceptions (IOError is an ancestor class of requests.RequestException)
149            resp.raise_for_status()
150            image = Image.open(BytesIO(resp.content)).convert("RGBA")
151            return cv2.cvtColor(np.array(image), cv2.COLOR_RGBA2BGRA)
152        except (requests.RequestException, IOError):153            return np.zeros((200, 200, 4), dtype=np.uint8)
154
155    def paste_image(background, overlay, x, y):