Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Jan 27, 2020
1 parent af4d99e commit 4f77162
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Tests/test_imagegrab.py
Expand Up @@ -38,11 +38,15 @@ def test_grab_no_xcb(self):
if sys.platform not in ("win32", "darwin"):
with self.assertRaises(IOError) as e:
ImageGrab.grab()
self.assertTrue(str(e.exception).startswith("Pillow was built without XCB support"))
self.assertTrue(
str(e.exception).startswith("Pillow was built without XCB support")
)

with self.assertRaises(IOError) as e:
ImageGrab.grab(xdisplay="")
self.assertTrue(str(e.exception).startswith("Pillow was built without XCB support"))
self.assertTrue(
str(e.exception).startswith("Pillow was built without XCB support")
)

@unittest.skipUnless(Image.core.HAVE_XCB, "requires XCB")
def test_grab_invalid_xdisplay(self):
Expand Down
2 changes: 1 addition & 1 deletion src/display.c
Expand Up @@ -887,7 +887,7 @@ PyImaging_GrabScreenX11(PyObject* self, PyObject* args)
buffer = PyBytes_FromStringAndSize((char*)xcb_get_image_data(reply),
xcb_get_image_data_length(reply));
} else {
PyErr_Format(PyExc_IOError, "usupported bit depth: %i", reply->depth);
PyErr_Format(PyExc_IOError, "unsupported bit depth: %i", reply->depth);
}

free(reply);
Expand Down

0 comments on commit 4f77162

Please sign in to comment.