From 5253b0cd57328028cab2dc96075bc00f96d53842 Mon Sep 17 00:00:00 2001 From: nulano Date: Sat, 28 Dec 2019 12:01:19 +0100 Subject: [PATCH] Use NotImplementedError in ImageGrab if using Linux Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- src/PIL/ImageGrab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index a3519fa21..66e2e8560 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -101,4 +101,4 @@ def grabclipboard(): return BmpImagePlugin.DibImageFile(io.BytesIO(data)) return data else: - raise IOError("ImageGrab.grabclipboard() is macOS and Windows only") + raise NotImplementedError("ImageGrab.grabclipboard() is macOS and Windows only")