summaryrefslogtreecommitdiff
path: root/cmd2/clipboard.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2019-09-07 16:11:44 -0600
committerkotfu <kotfu@kotfu.net>2019-09-07 16:11:44 -0600
commit74857c34c00323c881f1669ae95788dcff6a48fa (patch)
tree359649000c2e55ea913250244db59da4b1e0cfd7 /cmd2/clipboard.py
parentb9d21a222f02735be3c36be0cab8e83770619373 (diff)
parent693ec59719edc4384739392a0daea73c922b91c3 (diff)
downloadcmd2-git-74857c34c00323c881f1669ae95788dcff6a48fa.tar.gz
Merge branch 'master' into doc_additions
Diffstat (limited to 'cmd2/clipboard.py')
-rw-r--r--cmd2/clipboard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd2/clipboard.py b/cmd2/clipboard.py
index 18370f9a..deb2f5cc 100644
--- a/cmd2/clipboard.py
+++ b/cmd2/clipboard.py
@@ -10,8 +10,9 @@ from pyperclip import PyperclipException
try:
# Try getting the contents of the clipboard
_ = pyperclip.paste()
-except (PyperclipException, FileNotFoundError):
+except (PyperclipException, FileNotFoundError, ValueError):
# NOTE: FileNotFoundError is for Windows Subsystem for Linux (WSL) when Windows paths are removed from $PATH
+ # NOTE: ValueError is for headless Linux systems without Gtk installed
can_clip = False
else:
can_clip = True