equal
deleted
inserted
replaced
942 wx.TheClipboard.UsePrimarySelection(primary_selection) |
942 wx.TheClipboard.UsePrimarySelection(primary_selection) |
943 |
943 |
944 if not wx.TheClipboard.IsOpened(): |
944 if not wx.TheClipboard.IsOpened(): |
945 dataobj = wx.TextDataObject() |
945 dataobj = wx.TextDataObject() |
946 if wx.TheClipboard.Open(): |
946 if wx.TheClipboard.Open(): |
947 success = wx.TheClipboard.GetData(dataobj) |
947 success = False |
|
948 try: |
|
949 success = wx.TheClipboard.GetData(dataobj) |
|
950 except wx._core.PyAssertionError: |
|
951 pass |
948 wx.TheClipboard.Close() |
952 wx.TheClipboard.Close() |
949 if success: |
953 if success: |
950 data = dataobj.GetText() |
954 data = dataobj.GetText() |
951 return data |
955 return data |
952 |
956 |