Skip to content

Commit 8d0a57e

Browse files
committed
FIX more descriptive error when xsel not installed on linux
1 parent 58642a6 commit 8d0a57e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/util/clipboard.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ def osx_clipboard_set(text):
114114

115115

116116
def xsel_clipboard_set(text):
117-
from subprocess import Popen, PIPE
118-
p = Popen(['xsel', '-bi'], stdin=PIPE)
119-
p.communicate(input=text)
117+
try:
118+
from subprocess import Popen, PIPE
119+
p = Popen(['xsel', '-bi'], stdin=PIPE)
120+
p.communicate(input=text)
121+
except OSError:
122+
raise OSError("Clipboard_set on your platform requires the xsel command line tool to be installed.")

0 commit comments

Comments
 (0)