Skip to content

Commit

Permalink
Fix-up of #9843: Fixed an error preventing a failed copy operation fr…
Browse files Browse the repository at this point in the history
…om being reported.
  • Loading branch information
CyrilleB79 committed Dec 21, 2020
1 parent 5c91755 commit 546e711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def copyToClip(text: str, notify: Optional[bool] = False) -> bool:
winUser.emptyClipboard()
winUser.setClipboardData(winUser.CF_UNICODETEXT, text)
got = getClipData()
except ctypes.WinError:
except OSError:
if notify:
ui.reportTextCopiedToClipboard() # No argument reports a failure.
return False
Expand Down

0 comments on commit 546e711

Please sign in to comment.