mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
simplify code
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
1656edaf41
commit
d2e23e386b
|
@ -100,10 +100,9 @@ def grabclipboard():
|
|||
o = struct.unpack_from("I", data)[0]
|
||||
if data[16] != 0:
|
||||
files = data[o:].decode("utf-16le").split("\0")
|
||||
return files[: files.index("")]
|
||||
else:
|
||||
files = data[o:].decode("mbcs").split("\0")
|
||||
return files[: files.index("")]
|
||||
return files[: files.index("")]
|
||||
if isinstance(data, bytes):
|
||||
import io
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user