This commit is contained in:
Kovid Goyal 2022-09-09 15:41:45 +05:30
parent 79fba9dd9a
commit dd4a65e0c9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -72,6 +72,8 @@ class Clipboard:
def __call__(self, mime: str) -> Callable[[], bytes]: def __call__(self, mime: str) -> Callable[[], bytes]:
data = self.data.get(mime, b'') data = self.data.get(mime, b'')
if isinstance(data, str): # type: ignore
data = data.encode('utf-8') # type: ignore
if isinstance(data, bytes): if isinstance(data, bytes):
def chunker() -> bytes: def chunker() -> bytes:
nonlocal data nonlocal data