summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2018-04-18 00:18:39 -0400
committerEric Lin <anselor@gmail.com>2018-04-18 00:18:39 -0400
commit736cdda5f80682fadfc1556dae92046d2e9c770c (patch)
treef41995c9e6d31a42ccef01ebac3fff4662f396d0
parent8a5e2ffa464693bd915937721d2b7c17152110e9 (diff)
downloadcmd2-git-736cdda5f80682fadfc1556dae92046d2e9c770c.tar.gz
Adding back Pyperclip imports that got mixed up in merge
-rwxr-xr-xcmd2/cmd2.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index afe9bc84..87db423a 100755
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -70,6 +70,13 @@ elif rl_type == RlType.GNU:
rl_basic_quote_characters = ctypes.c_char_p.in_dll(readline_lib, "rl_basic_quote_characters")
orig_rl_basic_quote_characters_addr = ctypes.cast(rl_basic_quote_characters, ctypes.c_void_p).value
+# Newer versions of pyperclip are released as a single file, but older versions had a more complicated structure
+try:
+ from pyperclip.exceptions import PyperclipException
+except ImportError:
+ # noinspection PyUnresolvedReferences
+ from pyperclip import PyperclipException
+
# Collection is a container that is sizable and iterable
# It was introduced in Python 3.6. We will try to import it, otherwise use our implementation
try: