Remove useless try catch block

This commit is contained in:
rrcgat 2023-04-16 15:41:14 +08:00
parent 6d12581385
commit 3d54b8e2b2
No known key found for this signature in database
GPG Key ID: 8A5698D402519CF8

View File

@ -111,9 +111,6 @@ $ms = new-object System.IO.MemoryStream(, $bytes)
)
def test_grabclipboard_wl_clipboard(self, image_path):
with open(image_path, mode="rb") as raw_image:
try:
subprocess.call(["wl-copy"], stdin=raw_image)
im = ImageGrab.grabclipboard()
assert_image_equal_tofile(im, image_path)
except OSError as e:
pytest.skip(str(e))
subprocess.call(["wl-copy"], stdin=raw_image)
im = ImageGrab.grabclipboard()
assert_image_equal_tofile(im, image_path)