diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-16 08:29:37 -0700 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-04-16 08:29:37 -0700 |
commit | 11a9664f3bb9bba7b97b6400d787ee05842739cd (patch) | |
tree | 16f9f5c56427965de247dfca92e7481cf3fd4843 /cmd2.py | |
parent | 480c7f8bbcdf1179312f71f525e79102aa4551ae (diff) | |
download | cmd2-git-11a9664f3bb9bba7b97b6400d787ee05842739cd.tar.gz |
Changed setup.py requirement for pyperclip to >= 1.5.27 instead of 1.6.0
This is to support installation from package managers on older OSes such as Debian 9.
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -52,8 +52,14 @@ except ImportError: import pyparsing import pyperclip -from pyperclip import PyperclipException +# 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: |